Markus Feldmann wrote:
> Hi All,
> 
> i try to get a colorbar to work with:
>          if not hasattr(self, 'subplot3'):
>              self.subplot3 = self.figure.add_subplot(111)
>              self.subplot3.grid(True)
>          x,y,z = self.computehistogramm(min,min+self.maxitems)
>          X,Y = meshgrid(x,y)
>          plot = self.subplot3.pcolor(Y,X,z)
>          self.figure.colorbar(plot)
> 
> but the x and y axis are interchanged, like this:
> 
> 
> X
> |
> |
> |
> |
> |
> o-------------Y
> 
> But i want this:
> Y
> |
> |
> |
> |
> |
> o-------------X
> 
> So how can i change this ?
> the x and y data also depends on Z, so when i change x<-->y then i have
> change z too ?
> 

I don't understand what your question has to do with the colorbar; but 
in anything like pcolor, if you swap X and Y, then at the same time you 
need to transpose Z.
http://matplotlib.sourceforge.net/api/pyplot_api.html#axes-pcolor-grid-orientation

Eric

> Any hints for me ?
> 
> As i read in the examples and in the docu this shoul be right,
>      self.subplot3.pcolor(x,y,z)
> 
> But then my x and y data are wrong assigned to z, so i wrote
>      self.subplot3.pcolor(y,x,z)
> 
> How to change my code so x and y are right assigned to z and i get this:
> Y
> |
> |
> |
> |
> |
> o-------------X
> 
> regards Markus
> 
> 
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
> looking to deploy the next generation of Solaris that includes the latest 
> innovations from Sun and the OpenSource community. Download a copy and 
> enjoy capabilities such as Networking, Storage and Virtualization. 
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to