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 else isn't going to do so just let me know.

I will take care of it, thanks.

Eric

>
> Cheers,
> Jeff
>
> On Mon, Jul 30, 2012 at 2:31 AM, Eric Firing <efir...@hawaii.edu
> <mailto:efir...@hawaii.edu>> wrote:
>
>     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 = meshgrid(arange(20),arange(20)__)
>         Z = arange(20*20)
>         Z = Z.reshape(20,20)
>         norm = colors.Normalize(vmin=200,__vmax=None)
>         print norm.vmin
>         fig = figure(10)
>         ax = fig.add_subplot(111)
>         surf = ax.contourf(X,Y,Z, 100, cmap=matplotlib.cm.jet, norm = norm)
>
>         This vmin has no effect where if you pass in:
>
>         X, Y = meshgrid(arange(20),arange(20)__)
>         Z = arange(20*20)
>         Z = Z.reshape(20,20)
>         norm = colors.Normalize(vmin=200,__vmax=Z.max())
>         print norm.vmin
>         fig = figure(10)
>         ax = fig.add_subplot(111)
>         surf = ax.contourf(X,Y,Z, 100, cmap=matplotlib.cm.jet, norm = norm)
>
>         it has the desired effect.
>
>         Let me know if this is correct or I'm missing something here.
>
>         Cheers,
>         Jeff
>
>
>     You are correct.  Contour and contourf are respecting vmin, vmax
>     that have been set in the norm only if both have been set, so that
>     it is fully scaled.  I think that changing this to respect a single
>     preset vmin or vmax would be reasonable.
>
>     Eric
>
>


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to