Re: [Matplotlib-users] Misleading BoundaryNorm error

2015-07-31 Thread Eric Firing
Thank you! We are always happy to have new contributors! -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo

Re: [Matplotlib-users] Misleading BoundaryNorm error

2015-07-30 Thread Fabien
On 07/30/2015 10:07 AM, Eric Firing wrote: > Forcing the scalar to be a 1-element array would still leave the API > inconsistent with what you show for Normalize. One solution is to > flag a scalar at the start, and then de-reference at the end. Would > you like to submit a PR to take care of thi

Re: [Matplotlib-users] Misleading BoundaryNorm error

2015-07-30 Thread Eric Firing
Forcing the scalar to be a 1-element array would still leave the API inconsistent with what you show for Normalize. One solution is to flag a scalar at the start, and then de-reference at the end. Would you like to submit a PR to take care of this? ---

Re: [Matplotlib-users] Misleading BoundaryNorm error

2015-07-30 Thread Fabien
On 07/29/2015 10:34 PM, Paul Hobson wrote: > See the following example: > > import matplotlib as mpl > c = mpl.cm.get_cmap() > bnorm = mpl.colors.BoundaryNorm([0,1,2], c.N) > nnorm = mpl.colors.Normalize(0, 2) > > # This works: > In [8]: c(nnorm(1.1)) > Out[8]: (0.64

Re: [Matplotlib-users] Misleading BoundaryNorm error

2015-07-29 Thread Paul Hobson
On Wed, Jul 29, 2015 at 3:18 AM, Fabien wrote: > Folks, > > still in my exploring phase of Matplotlib's ecosystem I ran into > following mismatch between the APIs of BoundaryNorm and Normalize. > > See the following example: > > import matplotlib as mpl > c = mpl.cm.get_cmap() > bnorm = mpl.color

[Matplotlib-users] Misleading BoundaryNorm error

2015-07-29 Thread Fabien
Folks, still in my exploring phase of Matplotlib's ecosystem I ran into following mismatch between the APIs of BoundaryNorm and Normalize. See the following example: import matplotlib as mpl c = mpl.cm.get_cmap() bnorm = mpl.colors.BoundaryNorm([0,1,2], c.N) nnorm = mpl.colors.Normalize(0, 2)