I have something like (only the important bits of code):
cmap = mpl.cm.jet ##I set colomap to 'jet'
norm = mpl.colors.Normalize(vmin=5, vmax=15)
exampleInt = 7
##Here i would need a color value of 7 (in 5-15 range of jet colormap)
poly = Polygon(seg,facecolor=exampleInt(as color value))
ax.add_patch(poly)
In [10]: norm = mpl.colors.Normalize(vmin=5, vmax=15)
In [11]: cmap(norm(7))
Out[11]: (0.0, 0.29999999999999999, 1.0, 1.0)
···
On Thu, Jan 8, 2009 at 3:53 PM, AlsCdz <cadez_ales@...2418...> wrote:
I have something like (only the important bits of code):
cmap = mpl.cm.jet ##I set colomap to 'jet'
norm = mpl.colors.Normalize(vmin=5, vmax=15)
exampleInt = 7
##Here i would need a color value of 7 (in 5-15 range of jet colormap)
poly = Polygon(seg,facecolor=exampleInt(as color value))
ax.add_patch(poly)
I have something like (only the important bits of code):
cmap = mpl.cm.jet ##I set colomap to 'jet'
norm = mpl.colors.Normalize(vmin=5, vmax=15)
exampleInt = 7
##Here i would need a color value of 7 (in 5-15 range of jet colormap)
poly = Polygon(seg,facecolor=exampleInt(as color value)) ax.add_patch(poly)