On Wed, May 20, 2009 at 3:17 AM, marcusantonius <
markus.hai...@student.uibk.ac.at> wrote:
>
> Hi everybody,
> I have the problem, that I cannot add a color bar to a pcolor plot, which I
> generate of some Data files. If I do
> fig = plt.figure()
>
> plot1 = fig.add_subplot(231,aspect='equal')
> plot1.pcolor(xsr)
> plot1.axis([0, 127, 0, 127])
> plot1.colorbar()
>
> it just gives me
> AttributeError: 'AxesSubplot' object has no attribute 'colorbar'
> WARNING: Failure executing file: <test.py>
>
> What am I doing wrong? At the end of this file you find the whole plot-file
Thanks for the full example, but if you carefully read the exception, it was
telling you the problem. :) plot1 here is an axes object, which does not
have a colorbar() method. Instead, you should change that to:
plt.colorbar()
Assuming everything else was working, you should be good to go with this
change.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from Norman, Oklahoma, United States
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users