Mode = 'lines' is removing the markers

I want 2 lines to be represented more relevantly than the rest.

I am being able to determine the linewidth depending on which column of a Pandas DataFrame they belong to, but with the mode of the line I am having the following problem:

This is how I am defining the Scatter:

go.Scatter(
              x = df.index.values+1, 
              y = df[col],
              name = col,
              mode = 'lines+markers' if col in ['ensemble', 'ResNet56'] else 'lines',
              marker = {'size': 5},
              line = dict(
                  width = 2 if col in ['ensemble', 'ResNet56'] else 0.8,
                  dash = 'dash' if col not in ['ensemble', 'ResNet56'] else 'solid'),
                  visible = True if col in ['ensemble', 'ResNet56'] else 'legendonly'
                  )
           )

The width and dash/solid of the lines works fine. But the ‘lines’ move is not plotting the markers.

What am I missing?
Thanks!

That’s the intended behaviour. If you want to display lines and markers, it’s lines+markers. If you want to display only the points, it’s markers. Only lines is lines.

1 Like