Distinguish the first point and last point markers in a line graph trace

I have a line graph in (x,y) 2d plane. There are multiple x,y point pairs ordered in a certain order. I would like to distinguish the first and last point markers in the trace.

How do I do this ?

This is my code : https://codepen.io/rangarajan-k/pen/yKrqja

You don’t expose an easy way to do this. There’s a couple things you can try:

  • set marker.color to an array like ['red', 'blue', 'blue', ....., 'green']
  • add traces on top of your existing traces