I'm plotting a pandas dataframe which contains multiple time series.
I have more series than the number of colors matplotlib chooses from, so there is ambiguity in mapping legend colors to plots.
I haven't seen any matplotlib examples that assigns markers as a batch across all series and I'm wondering if there's a way to pass a list of marker styles that df.plot() can rotate through in the same way it chooses colors.
df.plot(markers = ??)
A for loop would be sufficient:
df = pd.DataFrame(np.arange(16).reshape(4,-1))
for c,m in zip(df,'oxds'):
    df[c].plot(marker=m)
plt.legend()
Output:

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With