pcolormesh and clim?

Hi all,

In 1.2.0:

pcolormesh(x,z,U,rasterized='True',cmap=cm.RdBu_r,clim=(-1.,1.))
#clim((-1.,1.))

Doesn't seem to work, where as

pcolormesh(x,z,U,rasterized='True',cmap=cm.RdBu_r,clim=(-1.,1.))
clim((-1.,1.))

does work. Is this a bug or am I misunderstanding "clim" in the context of pcolormesh?

Thanks, Jody

···

--
Jody Klymak
http://web.uvic.ca/~jklymak/

Hi all,

In 1.2.0:

pcolormesh(x,z,U,rasterized='True',cmap=cm.RdBu_r,clim=(-1.,1.))

Jody,

There is no clim kwarg, only a clim pyplot function. You can do this, though:

pcolormesh(..., vmin=-1, vmax=1)

Eric

···

On 2013/03/28 7:56 AM, Jody Klymak wrote:

#clim((-1.,1.))

Doesn't seem to work, where as

pcolormesh(x,z,U,rasterized='True',cmap=cm.RdBu_r,clim=(-1.,1.))
clim((-1.,1.))

does work. Is this a bug or am I misunderstanding "clim" in the context of pcolormesh?

Thanks, Jody

--
Jody Klymak
Jody M. Klymak - UVic Ocean Physics

------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Hi Eric,

The docs seem to indicate "clim" is an acceptable kwarg, hence my confusion...

http://matplotlib.org/api/pyplot_api.html?highlight=pcolormesh#matplotlib.pyplot.pcolormesh

Thanks, Jody

···

On Mar 28, 2013, at 11:12 AM, Eric Firing <efiring@...202...> wrote:

On 2013/03/28 7:56 AM, Jody Klymak wrote:

Hi all,

In 1.2.0:

pcolormesh(x,z,U,rasterized='True',cmap=cm.RdBu_r,clim=(-1.,1.))

Jody,

There is no clim kwarg, only a clim pyplot function. You can do this,
though:

pcolormesh(..., vmin=-1, vmax=1)

Eric

#clim((-1.,1.))

Doesn't seem to work, where as

pcolormesh(x,z,U,rasterized='True',cmap=cm.RdBu_r,clim=(-1.,1.))
clim((-1.,1.))

does work. Is this a bug or am I misunderstanding "clim" in the context of pcolormesh?

Thanks, Jody

--
Jody Klymak
Jody M. Klymak - UVic Ocean Physics

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

--
Jody Klymak

Hi Eric,

The docs seem to indicate "clim" is an acceptable kwarg, hence my confusion...

Jody,

You are right, that chunk of the docs is completely fouled up with respect to kwargs. Thanks for pointing it out. The whole table of supposed QuadMesh properties should not be there. Doc autogeneration has run amok here. Pay attention only to the listed keyword arguments above that table.

Eric

···

On 2013/03/28 8:23 AM, Jody Klymak wrote:

http://matplotlib.org/api/pyplot_api.html?highlight=pcolormesh#matplotlib.pyplot.pcolormesh

Thanks, Jody

On Mar 28, 2013, at 11:12 AM, Eric Firing <efiring@...202...> wrote:

On 2013/03/28 7:56 AM, Jody Klymak wrote:

Hi all,

In 1.2.0:

pcolormesh(x,z,U,rasterized='True',cmap=cm.RdBu_r,clim=(-1.,1.))

Jody,

There is no clim kwarg, only a clim pyplot function. You can do this,
though:

pcolormesh(..., vmin=-1, vmax=1)

Eric

#clim((-1.,1.))

Doesn't seem to work, where as

pcolormesh(x,z,U,rasterized='True',cmap=cm.RdBu_r,clim=(-1.,1.))
clim((-1.,1.))

does work. Is this a bug or am I misunderstanding "clim" in the context of pcolormesh?

Thanks, Jody

--
Jody Klymak
Jody M. Klymak - UVic Ocean Physics

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

--
Jody Klymak
Jody M. Klymak - UVic Ocean Physics

Sounds good....

OTOH a clim argument for pcolormesh would be nice, as I often end up calling "clim" after I've made a contour overtop of my pcolor, and then call clim, which is obviously not what I mean to do, but...

Thanks, Jody

···

On Mar 28, 2013, at 11:51 AM, Eric Firing <efiring@...202...> wrote:

Pay attention only to the listed keyword arguments above that table.

--
Jody Klymak

Pay attention only to the listed keyword arguments above that table.

Sounds good....

OTOH a clim argument for pcolormesh would be nice, as I often end up calling "clim" after I've made a contour overtop of my pcolor, and then call clim, which is obviously not what I mean to do, but...

The problem is that it would be entirely redundant, given the vmin and vmax kwargs that have been there for a long time. I see your point, but we can't get rid of vmin and vmax (they provide more flexibility than clim would), so I think that the clutter disadvantage of adding clim outweighs the advantage.

Eric

···

On 2013/03/28 11:04 AM, Jody Klymak wrote:

On Mar 28, 2013, at 11:51 AM, Eric Firing <efiring@...202...> wrote:

Thanks, Jody

--
Jody Klymak
Jody M. Klymak - UVic Ocean Physics

Fair enough - I just often play with symmetric axis limits (i.e. [-1.,1.]) and so its helpful to be able to specify as an array and do something like clim = array([-1.,1.])*0.2 (for instance). Of course matplotlib probably has some other fancy way to rescale the vmin and vmax simultaneously...

Thanks a lot, Jody

···

On Mar 28, 2013, at 14:36 PM, Eric Firing <efiring@...202...> wrote:

The problem is that it would be entirely redundant, given the vmin and vmax kwargs that have been there for a long time.

--
Jody Klymak