Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: André Wobst <wobsta@us...>  20110124 22:05:52

Dear Dave, first of all thanks for sending this complete minimal example. You likely wouldn't have got an timely answer by me without it. Tuples are the right way to specify the y values. It is nice to see that you basically already got the point. The problem comes from "value+delta" in the adjustaxis method of the range style (graph/style.py). Both value and delta are tuples like (0, 0.1) and (0, 0.08) and "+" adds them and creates a tuple (0, 0.1, 0, 0.08). Instead (0, 0.18) should have been created. I don't really know how to properly fix that. Probably the possibility to provide a delta is just not supported for split axes. (For the moment it clearly is, whether this is acceptable. For the moment I would say so.) Anyway, as we identified the addition to be the problem, how about specifying the ymin and ymax value for the error bars? This runs fine, problem solved. Here is the code: from pyx import * g = graph.graphxy(width=8, y=graph.axis.split()) g.plot(graph.data.points([(0.1, (0,0.1), (0,0.02), (0,0.18)), (0.5, (0,0.2), (0,0.12), (0,0.28)), (0.9, (0,0.3), (0,0.22), (0,0.38)), (101, (1,0.7), (1,0.62), (1,0.78)), (105, (1,0.8), (1,0.72), (1,0.88)), (109, (1,0.9), (1,0.82), (1,0.98))], x=1, y=2, ymin=3, ymax=4), [graph.style.symbol(),graph.style.errorbar()]) g.writePDFfile("minimal") Best, André Am 22.01.2011 um 20:09 schrieb Dave Willmer: > Hi everyone, > > I'm having trouble getting error bars to appear on the yaxis when using a > split yaxis, has anyone has any experience with this? > Using the minimal example from the PyX website, I've got: > > > from pyx import * > > > g = graph.graphxy(width=8, y=graph.axis.split()) > > g.plot(graph.data.points([(0.1, (0,0.1), 0.08), > > (0.5, (0,0.2), 0.08), > > (0.9, (0,0.3), 0.08), > > (101, (1,0.7), 0.08), > > (105, (1,0.8), 0.08), > > (109, (1,0.9), 0.08)], x=1, y=2, dy=3), > > [graph.style.symbol(),graph.style.errorbar()]) > > g.writePDFfile("minimal") > > > > which is just adding a third column to the data points, and assigning it to > dy. This works if the xaxis is split (with yerrorbars), but doesn't work > if the yaxis is split. Also, it doesn't generate any error message  the > graph is created, it's just missing the errorbars. > > > I've tried changing the third (dy) data column to be a tuple like the > ycolumn, ie: > > > g.plot(graph.data.points([(0.1, (0,0.1), (0,0.08)), ... > > > however this throws the error > > > File "/Library/Python/2.5/sitepackages/pyx/graph/axis/axis.py", line 348, > in adjustaxis > > assert len(value) == 2, "tuple of size two expected by bar axis '%s'" % > errorname > > AssertionError: tuple of size two expected by bar axis 'y' > > > Sticking in a 'print type(value), value)' statement just before this assert, > the data going in is: > > > <type 'tuple'> (0, 0.10000000000000001) > > <type 'tuple'> (0, 0.20000000000000001) > > <type 'tuple'> (0, 0.29999999999999999) > > <type 'tuple'> (1, 0.69999999999999996) > > <type 'tuple'> (1, 0.80000000000000004) > > <type 'tuple'> (1, 0.90000000000000002) > > <type 'tuple'> (0, 0.10000000000000001, 0, 0.080000000000000002) > > > so obviously this is cycling over the ydata, but then when it gets to the > dy column, it still includes the ydata (or the dy has just been added to > it). > > > Anyone any ideas? > > Do the dy values have to be assigned to the subcanvas individually? > > > Any help is much appreciated! > > Also, many thanks to Andre et al for a great piece of software! > > > Cheers, > > Dave. >  > Special Offer Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a worldclass log management solution at an even better pricefree! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsightsfd2d_______________________________________________ > PyXuser mailing list > PyXuser@... > https://lists.sourceforge.net/lists/listinfo/pyxuser  by _ _ _ Dr. André Wobst, Amselweg 22, 85716 Unterschleißheim / \ \ / ) wobsta@..., http://www.wobsta.de/ / _ \ \/\/ / PyX  High quality PostScript and PDF figures (_/ \_)_/\_/ with Python & TeX: visit http://pyx.sourceforge.net/ 