On 2012/07/30 1:17 AM, Jeffrey Spencer wrote:
I'd agree as then it would work as pcolormesh or imshow does which when
passed in the same norm will only set vmin or vmax that wasn't
previously set.
Assume this would be a really easy fix but I can have a look at
submitting a patch if someone
Think I figured out an actual bug in the function: colors.Normalize().
The behavior states that if vmin or vmax is passed in as None it should
take the minimum or maximum value respectively.
If only one value is passed into the function, both values are overwritten
to the min and max instead of
On 2012/07/28 10:17 PM, Jeffrey Spencer wrote:
Think I figured out an actual bug in the function: colors.Normalize().
The behavior states that if vmin or vmax is passed in as None it should
take the minimum or maximum value respectively.
If only one value is passed into the function, both
Eric,
Normalize appears to be working correctly and as you stated above but when
passed into contourf appears to have inconsistent results not following the
docstring by allowing the value to change.
Quick examples:
X, Y = meshgrid(arange(20),arange(20))
Z = arange(20*20)
Z = Z.reshape(20,20)
On 2012/07/29 5:13 AM, Jeffrey Spencer wrote:
Eric,
Normalize appears to be working correctly and as you stated above but
when passed into contourf appears to have inconsistent results not
following the docstring by allowing the value to change.
Quick examples:
X, Y =
On 2012/07/26 7:52 PM, Jeffrey Spencer wrote:
I am trying to make a plot with a colorbar that has a reduced axis over
which the colorbar is executed.
This is set via passing in a norm to contourf:
logNorm = colors.Normalize(vmax=0,vmin=-100)
surf = ax.contourf(X,Y,logZ,
Further after doing a little digging the code in
matplotlib.colorbar.Colorbar looks correct to me but doesn't work correctly.
It essentially ignores the norm value because always sets the norm to the
norm for the contour plot (eg. mappable.norm) which this is the same norm
with vmin and vmax
I am using 1.2.X and here is a minimalist example to see what happens:
Link to figure of output:
https://dl.dropbox.com/u/13534143/example.png
Example:
import numpy as np
import matplotlib as mpl
X, Y = np.meshgrid(arange(20),arange(20))
Z = np.arange(20*20)
Z = Z.reshape(20,20)
logNorm =
On 2012/07/26 9:20 PM, Jeffrey Spencer wrote:
import numpy as np
import matplotlib as mpl
X, Y = np.meshgrid(arange(20),arange(20))
Z = np.arange(20*20)
Z = Z.reshape(20,20)
logNorm = mpl.colors.Normalize(vmin=0,vmax=200)
fig = mpl.pyplot.figure(10)
ax = fig.add_subplot(111)
surf =
On 2012/07/26 10:26 PM, Jeffrey Spencer wrote:
Thanks, that is all good info to know. I change my data to log and
normalize it so the logNorm is just linear actually so specifying only
levels is fine. I'll let you know if that doesn't work properly for some
reason.
Ok, yeah I looked at
I figured out you can pass in the rasterized keyword to all of those to
change the rasterization in the output.
Also the docs say for pcolormesh it defaults to the backend if not set.
Therefore, in the case of a vector based it would output vectors if not set
to rasterize.
Haven't tested but
I am trying to make a plot with a colorbar that has a reduced axis over
which the colorbar is executed.
This is set via passing in a norm to contourf:
logNorm = colors.Normalize(vmax=0,vmin=-100)
surf = ax.contourf(X,Y,logZ, map_scale, cmap=cm.jet, norm=logNorm)
The output of
12 matches
Mail list logo