Colors in matplotlib
In this tutorial I will talk about colors in matplotlib.For more info check the Matplotlib color documentary .
Basic color which are available in the matplotlib is
b: blue
g: green
r: red
c: cyan
m: magenta
y: yellow
k: black
w: white
Somthing simple like this.
import pylab as pl
x=pl.arange(10)
pl.plot(x*x,"-*",color="r",markersize=30)
pl.plot(x*x,"-*",color="IndianRed",markersize=30)
you can pass an R , G , B tuple, where each of R , G , B are in the range [0,1].
pl.plot(x*x,"-*",color=[0,0.5,0.90],markersize=20)
You can specify the color using an html hex string, as in:
color = '#eeefff'
Comments
Post a Comment