Hi, I've just upgraded to mpl 0.99 (from svn) and Basemap (also from svn).
It seems that plt.clim(vmin,vmax) no longer works with Basemap
objects. Here is an example, which before used to work:
In [92]: M.pcolormesh(x, y, a_var,cmap=cm)
Out[92]: <matplotlib.collections.QuadMesh object at 0x7f8f2faf3d90>
In [93]: plt.clim(-10,10)
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
/home/emason/pytools/fig_thesis_ssh_variance_prime_month.py in <module>()
----> 1
2
3
4
5
/usr/lib64/python2.6/site-packages/matplotlib/pyplot.pyc in clim(vmin, vmax)
1379 im = gci()
1380 if im is None:
-> 1381 raise RuntimeError('You must first define an image, eg
with imshow')
1382
1383 im.set_clim(vmin, vmax)
RuntimeError: You must first define an image, eg with imshow
In [94]:
Using plt.pcolormesh there's no problem. Has this change been done
intentionally? If so, what is now the recommended way to apply
climits to a Basemap plot?
Thanks, Evan
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users