From: Andre W. <wo...@us...> - 2004-04-26 18:21:37
|
Hi, On 26.04.04, Marko Vendelin wrote: > I would like to report a bug (or rather strange feature) in the current > version of PyX (0.6.2) and request a feature. > > First, there seems to be a bug in current version of PyX (0.6.2). Namely, > if I plot a line which is outside the current axis, I get error from > python: This clearly is a bug. Don't be shy ... ;-) I've just fixed it in both, the CVS head and the 0.6 branch. The problem is, that PyX inserts the empty path into the canvas. The patch is: andre@pb:~/python/pyx06/pyx/graph$ cvs diff -r 1.5.2.1 style.py Index: style.py =================================================================== RCS file: /cvsroot/pyx/pyx/pyx/graph/style.py,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -r1.5.2.1 -r1.5.2.2 468c468 < if data.lineattrs is not None: --- > if data.lineattrs is not None and len(data.path.path): ------------ > Second, it would be nice to have a possibility to draw bars with > errorsbars, similar to functionality of symbol. For example, use the same > syntax as when drawing lines and add new column "dy": > > ... graph.data.list( data, xname=1, y=2, dy=3 ) ... > > At present, I have to use rather crude hack to add them into the plot: > a. insert into canvas graph with bars > b. insert into canvas at the same place graph with errorbars > > Such hack requires exact knowledge of bar positioning ( I still haven't > figured out how "dist" argument modifies positioning of the bars if used > in "multisubaxis" ). Maybe there is a simpler solution, but I haven't > found it. However, I think that addition of "dy" column to current bar > implementation would be welcomed by many users. For 0.7 I'm working to allow several styles within one plot command. I want to allow errorbars at bar graphs without further thoughts: g.plot(graph.data.list(xname=1, y=2, dy=3), [graph.style.bar(), graph.style.errorbar()]) I also want to enable insertion of text at the top (or another position) of a bar graph and others. Another gain will be an easier extention of existing styles without copying much code as it currently can be, because graph styles are still quite monolithic. So you have to wait for another two or three months. (Beside that I could explain you the bar dist etc. when you ask questions about it ...) André -- by _ _ _ Dr. André Wobst / \ \ / ) wo...@us..., http://www.wobsta.de/ / _ \ \/\/ / PyX - High quality PostScript figures with Python & TeX (_/ \_)_/\_/ visit http://pyx.sourceforge.net/ |