Whoops. Forgot to include the patches for CHANGELOG and API_CHANGES. I
updated barh_demo.py as well, and tested the rest of the bar demos.
Here's the combined patch against 2515.
Sorry for the hassle, I'm a bit new at this.
Cheers,
Martin
John Hunter wrote:
"Martin" == Martin Spacek <[EMAIL PROTECTED]> writes:
Martin> Ah, I was just working off the axes.py file from
Martin> viewcvs. I've checked out now from /trunk/matplotlib/
Martin> (using tortoise svn). Hopefully this new patch file will
Martin> work.
Making progress - I was able to apply this and check it in, but I only
got a patch for axes.py (no CHANGELOG, API_CHANGES, modified examples,
etc). Also, examples/barh_demo.py is now broken after application of
this partial patch). Could you get a fresh checkout from svn
(revision 2515) and see what is missing and then provide an updated
patch?
Thanks!
JDH
Index: API_CHANGES
===================================================================
--- API_CHANGES (revision 2515)
+++ API_CHANGES (working copy)
@@ -1,3 +1,18 @@
+ barh: x and y args have been renamed to width and bottom
+ respectively, and their order has been swapped to maintain
+ a (position, value) order.
+
+ bar and barh: now accept kwarg 'edgecolor'.
+
+ bar and barh: The left, height, width and bottom args can
+ now all be scalars or sequences; see docstring.
+
+ barh: now defaults to edge aligned instead of center
+ aligned bars
+
+ bar, barh and hist: Added a keyword arg 'align' that
+ controls between edge or center bar alignment.
+
Collections: PolyCollection and LineCollection now accept
vertices or segments either in the original form [(x,y),
(x,y), ...] or as a 2D numerix array, with X as the first column
Index: CHANGELOG
===================================================================
--- CHANGELOG (revision 2515)
+++ CHANGELOG (working copy)
@@ -1,3 +1,19 @@
+2006-06-22 Various changes to bar(), barh(), and hist().
+ Added 'edgecolor' keyword arg to bar() and barh().
+ The x and y args in barh() have been renamed to width
+ and bottom respectively, and their order has been swapped
+ to maintain a (position, value) order ala matlab. left,
+ height, width and bottom args can now all be scalars or
+ sequences. barh() now defaults to edge alignment instead
+ of center alignment. Added a keyword arg 'align' to bar(),
+ barh() and hist() that controls between edge or center bar
+ alignment. Fixed ignoring the rcParams['patch.facecolor']
+ for bar color in bar() and barh(). Fixed ignoring the
+ rcParams['lines.color'] for error bar color in bar()
+ and barh(). Fixed a bug where patches would be cleared
+ when error bars were plotted if rcParams['axes.hold']
+ was False. - MAS
+
2006-06-22 Added support for numerix 2-D arrays as alternatives to
a sequence of (x,y) tuples for specifying paths in
collections, quiver, contour, pcolor, transforms.
Index: examples/barh_demo.py
===================================================================
--- examples/barh_demo.py (revision 2515)
+++ examples/barh_demo.py (working copy)
@@ -2,19 +2,19 @@
# make a horizontal bar chart
from pylab import *
-x = 3+10*rand(5) # the bar lengths
-y = arange(5)+.5 # the bar centers on the y axis
+val = 3+10*rand(5) # the bar lengths
+pos = arange(5)+.5 # the bar centers on the y axis
figure(1)
-barh(x,y)
-yticks(y, ('Tom', 'Dick', 'Harry', 'Slim', 'Jim'))
+barh(pos,val, align='center')
+yticks(pos, ('Tom', 'Dick', 'Harry', 'Slim', 'Jim'))
xlabel('Perfomance')
title('How fast do you want to go today?')
grid(True)
figure(2)
-barh(x,y, xerr=rand(5))
-yticks(y, ('Tom', 'Dick', 'Harry', 'Slim', 'Jim'))
+barh(pos,val, xerr=rand(5), align='center')
+yticks(pos, ('Tom', 'Dick', 'Harry', 'Slim', 'Jim'))
xlabel('Perfomance')
show()
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel