Reputation: 15
I have 20 columns to plot using unrepeated colors. I would like to use tab20
color map. How do I use it?
I am finding all the online resources difficult to understand as I am still naive Python user.
Upvotes: 1
Views: 476
Reputation: 12417
In general this is how you can do it:
import matplotlib
cmap = matplotlib.cm.get_cmap(your_cmap) #your_cmap='tab20'
df.plot(cmap=cmap)
plot.show()
Here you can find the references: https://matplotlib.org/examples/color/colormaps_reference.html
Upvotes: 1