Hi,
 
The following code fails for me with matplotlib-0.90.0 --
 
---------------------------------------------------
import pylab as pl
 
x = pl.randn(1000)
 
pl.hist(x, orientation='horizontal')
 
pl.show()
---------------------------------------------------
 
This is because Axes.barh() [called by Axes.hist() in axes.py] doesn't
accept the keyword argument 'log'. The attached patch fixes the problem
for my purposes (linear scaling of the axes) but obviously fails to
scale the bin count axis correctly if hist() is called with log=True
i.e. pl.hist(x, orientation='horizontal', log=True).
 
It appears that this is still the case in the latest svn version of
axes.py.
 
Cheers,
Scott
 

Please find our Email Disclaimer here: http://www.ukzn.ac.za/disclaimer/
--- axes.py     2007-01-22 18:57:58.000000000 +0200
+++ patched_axes.py     2007-04-30 15:12:15.921875000 +0200
@@ -4462,7 +4462,7 @@
         if width is None: width = 0.9*(bins[1]-bins[0])
         if orientation == 'horizontal':
             patches = self.barh(bins, n, height=width, left=bottom,
-                                align=align, log=log)
+                                align=align)
         elif orientation == 'vertical':
             patches = self.bar(bins, n, width=width, bottom=bottom,
                                 align=align, log=log)
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to