Plotly markers symbols

This is built in to Plotly, their docs say:

If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.

(Here’s the part of their docs I’m talking about)

That sounds like a sensible default to me, they want to avoid a plot with 100s of points getting crowded out by markers.

You can override it by setting mode to 'lines+markers':

Of course, if you wanted to switch to 'lines' when you had, say, 50 points, you could use a Python conditional for that:

mode='lines+markers' if len(y) < 50 else 'lines'
1 Like