Michael Droettboom wrote: > The transforms branch has seen very little outside of the matplotlib > examples, so it's good to find all of these error cases. Fixed in r4569. > > Cheers, > Mike > >> Michael: And one more - contourf will die if you there are no >> contours at the requested levels. The error message looks like this: >> >> Traceback (most recent call last): >> File "plotprecip.py", line 52, in <module> >> cs = m.contourf(x,y,data,clevs,cmap=cm.s3pcpn) >> File "/Users/jsw/lib/python/matplotlib/toolkits/basemap/basemap.py", >> line 2425, in contourf >> CS = ax.contourf(x,y,data,*args,**kwargs) >> File "/Users/jsw/lib/python/matplotlib/axes.py", line 5017, in contourf >> return mcontour.ContourSet(self, *args, **kwargs) >> File "/Users/jsw/lib/python/matplotlib/contour.py", line 460, in >> __init__ >> self.ax.add_collection(col) >> File "/Users/jsw/lib/python/matplotlib/axes.py", line 1140, in >> add_collection >> self.update_datalim(collection.get_datalim(self.transData)) >> File "/Users/jsw/lib/python/matplotlib/collections.py", line 142, in >> get_datalim >> offsets, transOffset.frozen()) >> File "/Users/jsw/lib/python/matplotlib/path.py", line 481, in >> get_path_collection_extents >> raise ValueError("No paths provided") >> >> To trigger this, try running the plotprecip.py basemap example. >> >> -Jeff >> > Michael: The fix for missing contours may have broken pcolor:
Traceback (most recent call last): File "test.py", line 553, in <module> p = m.pcolormesh(x,y,topodatin,shading='flat') File "/Users/jsw/lib/python/matplotlib/toolkits/basemap/basemap.py", line 2294, in pcolormesh ret = ax.pcolormesh(x,y,data,**kwargs) File "/Users/jsw/lib/python/matplotlib/axes.py", line 4836, in pcolormesh self.add_collection(collection) File "/Users/jsw/lib/python/matplotlib/axes.py", line 1140, in add_collection if len(collection._paths): TypeError: object of type 'NoneType' has no len() changing if len(collection._paths): to if collection._paths and len(collection._paths) in axes.py seems to fix it. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : [EMAIL PROTECTED] 325 Broadway Office : Skaggs Research Cntr 1D-124 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel