3

I have a chart of the performance of different optimisations/C flags for the Intel-icc compiler with increasing system size. There are 4 in total but it can be hard to see each one of them on the chart despite the different colours. The best way of distinguishing them will be to add a different marker to each line. However, this is where I'm stuck. Although I can use 1 marker, therefore all lines will have the same marker; not much use.

What works:

import matplotlib.pyplot as plt

df.plot.line(marker = 'x')
plt.xlabel('System Size')
plt.ylabel('Updated Cells')

Thats fine. enter image description here

So I guess the problem I've got is associating a different marker/symbol to each line.

Any help/direction appreciated

MRL
  • 389
  • 5
  • 22

1 Answers1

3

You can just make a quick loop and plot each column separately:

for m, col in zip('xosd', df):
    df[col].plot(marker=m)
    
plt.legend()

Output:

enter image description here

Quang Hoang
  • 146,074
  • 10
  • 56
  • 74