Re: [Matplotlib-users] contourf problem

2010-03-30 Thread Alan G Isaac
> 2010/3/29 Alan G Isaac : > > Can you explain this: > > norm = colors.Normalize(vmin = -1, vmax = 1) On 3/28/2010 10:05 PM, Friedrich Romstedt wrote: > The normaliser takes some arbitrary value and returns a value in [0, > 1]. Hence the name. The value \in [0, 1] is handed over to the > cma

Re: [Matplotlib-users] contourf problem

2010-03-28 Thread Friedrich Romstedt
2010/3/29 Alan G Isaac : > Can you explain this: > norm = colors.Normalize(vmin = -1, vmax = 1) The normaliser takes some arbitrary value and returns a value in [0, 1]. Hence the name. The value \in [0, 1] is handed over to the cmap's __call__(), resulting in the color value. And yes, I guess y

Re: [Matplotlib-users] contourf problem

2010-03-28 Thread Alan G Isaac
On 3/28/2010 7:19 PM, Friedrich Romstedt wrote: > I fixed your problem Can you explain this: norm = colors.Normalize(vmin = -1, vmax = 1) I take it that this scales the range for the color bar, which is what 'luminance' must refer to in the docs? In which case, can we just set vmin and vmax as i

Re: [Matplotlib-users] contourf problem

2010-03-28 Thread Friedrich Romstedt
2010/3/29 Alan G Isaac : > OK, it's obvious one you point it out. > Sorry for the typo in the example. > > Now suppose I want a colorbar labelled at -1, 0, 1 > but the highest value realized is <1. Can I somehow > use ticks=(-1,0,1) anyway, or do I have to tick at > the realized limits and then la

Re: [Matplotlib-users] contourf problem

2010-03-28 Thread Alan G Isaac
On 3/28/2010 3:04 PM, Ryan May wrote: > it's just using indices, which run from 0 to 99. Since the limits > are 0 to 100, bam...white space because, indeed, there is no data. > OK, it's obvious one you point it out. Sorry for the typo in the example. Now suppose I want a colorbar labelled at

Re: [Matplotlib-users] contourf problem

2010-03-28 Thread Ryan May
On Sun, Mar 28, 2010 at 11:16 AM, Alan G Isaac wrote: > Using contourf in version 0.99.1, > I'm seeing an unwanted white strip to > the top and right, adjacent to the axes. > (In fact, the strip looks just wide > enough to underlay the ticks.) > > Alan Isaac > > PS Simple example: > > x = np.linsp

[Matplotlib-users] contourf problem

2010-03-28 Thread Alan G Isaac
Using contourf in version 0.99.1, I'm seeing an unwanted white strip to the top and right, adjacent to the axes. (In fact, the strip looks just wide enough to underlay the ticks.) Alan Isaac PS Simple example: x = np.linspace(-5, 5, 100) X, Y = np.meshgrid(x, x) Z = np.sin(x*y[:,None]) fig = plt