Re: [Matplotlib-users] cmap normalization question

2011-10-31 Thread Daniel Hyams
Try nm = matplotlib.colors.Normalize(desired_min, desired_max) plt.scatter(x1,y1,c=myarr1,cmap=plt.get_cmap("gist_heat"),norm=nm) You could just use the vmin/vmax keywords in the scatter() call, but I've just always preferred using Normalize(); you have more control over what happens that way (s

Re: [Matplotlib-users] cmap normalization question

2011-10-31 Thread Benjamin Root
On Mon, Oct 31, 2011 at 11:02 AM, Tommy Grav wrote: > Hi, > > I have been looking around but can't find what I want. > I have two arrays, one with numbers from 0.02 to 0.20 and > the other from 0.03 to 0.50. I am trying to plot them together > with other arrays in a scatterplot where these two

[Matplotlib-users] cmap normalization question

2011-10-31 Thread Tommy Grav
Hi, I have been looking around but can't find what I want. I have two arrays, one with numbers from 0.02 to 0.20 and the other from 0.03 to 0.50. I am trying to plot them together with other arrays in a scatterplot where these two are the color term plt.scatter(x1,y1,c=myarr1,cmap=plt.get_cmap