When creating plots with matplotlib, we usually use the
"default" color names:
- b : blue
- g : green
- r : red
- c : cyan
- m : magenta
- y : yellow
- k : black
- w : white
It turns out that matplotlib accepts not only these default color names, but
the full range of html color names! So for example, you can plot some data like this:
pylab.plot(x, y, 'DarkOrange')
and get a "dark orange" color.
This is an easy way of specifying colors in addition to the standard ones.
This is possibly the most useful matplotlib related post ever.
ReplyDeleteThanks, mate.
^^ Completely agree!
ReplyDeleteDude, this really helps a lot! Thanks for the insight!
ReplyDeleteI appreciate your work on Python. It's such a wonderful read on Python tutorial. Keep sharing stuffs like this. I am also educating people on similar Python so if you are interested to know more you can watch this Python tutorial:-https://www.youtube.com/watch?v=HcsvDObzW2U
ReplyDelete