From: Michael SCHINDLER <mschindler@us...>  20100706 10:42:42

Salut André, I have a little problem with linkedaxis. I want to plot two data sets, which are to be plotted in differents graphs. The second should be clipped according to whatever the first graph has chosen as the y axis. But, the linkedaxis somehow extends such that the whole dataset is plotted. Is this behavior intended? If yes, which parameter should I use as the min/max argument of the yaxis in h? The axis of g has no explicit min/max: g.axes["y"].axis.min is None And the data min/max is not what I want. There should be something in the parter which I do not find ... Here is a minimal example:  from pyx import * g = graph.graphxy(width=10) g.plot(graph.data.file("data1.dat", x=1, y=2), [graph.style.line()]) g.finish() # fix the axes of g h = graph.graphxy(width=10, y=graph.axis.linkedaxis(g.axes["y"])) h.plot(graph.data.file("data2.dat", x=1, y=2), [graph.style.line()]) g.insert(h, [trafo.translate(0, g.bbox().bottom()h.bbox().top()0.5)]) g.writePDFfile("minimal")  Many thanks, Michael 
From: André Wobst <wobsta@us...>  20100706 10:57:03
Attachments:
smime.p7s

Hi Michael, Am 06.07.2010 um 12:42 schrieb Michael SCHINDLER: > I have a little problem with linkedaxis. I want to plot two data sets, > which are to be plotted in differents graphs. Yes, this is the intended behaviour. > The second should be > clipped according to whatever the first graph has chosen as the y > axis. What about calling g.dodata before start to work on h? Then the axis range should be fixed (and a warning will be issued). I didn't check whether this works. I coded it years ago and might be wrong on whether this really works. But I would expect this "workfow" to be supported and to solve your issue. Does it? André > But, the linkedaxis somehow extends such that the whole dataset > is plotted. Is this behavior intended? > > If yes, which parameter should I use as the min/max argument of the > yaxis in h? The axis of g has no explicit min/max: > g.axes["y"].axis.min is None > And the data min/max is not what I want. There should be something in > the parter which I do not find ... > > Here is a minimal example: > >  > from pyx import * > > g = graph.graphxy(width=10) > g.plot(graph.data.file("data1.dat", x=1, y=2), [graph.style.line()]) > g.finish() # fix the axes of g > > h = graph.graphxy(width=10, y=graph.axis.linkedaxis(g.axes["y"])) > h.plot(graph.data.file("data2.dat", x=1, y=2), [graph.style.line()]) > > g.insert(h, [trafo.translate(0, g.bbox().bottom()h.bbox().top()0.5)]) > g.writePDFfile("minimal") >  > > Many thanks, > Michael > >  > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first  http://p.sf.net/sfu/sprintcomfirst > _______________________________________________ > PyXdevel mailing list > PyXdevel@... > https://lists.sourceforge.net/lists/listinfo/pyxdevel  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/ 
From: Michael SCHINDLER <mschindler@us...>  20100706 11:48:42

Salut André, On 06/07/10, André Wobst wrote: > What about calling g.dodata before start to work on h? Then the axis > range should be fixed (and a warning will be issued). > I didn't check whether this works. I coded it years ago and might be > wrong on whether this really works. But I would expect this > "workfow" to be supported and to solve your issue. Does it? I am even calling g.finish, which does the g.dodata if I am correctly informed. So, the answer would be no, it does not solve the issue. > > Here is a minimal example: > > > >  > > from pyx import * > > > > g = graph.graphxy(width=10) > > g.plot(graph.data.file("data1.dat", x=1, y=2), [graph.style.line()]) > > g.finish() # fix the axes of g > > > > h = graph.graphxy(width=10, y=graph.axis.linkedaxis(g.axes["y"])) > > h.plot(graph.data.file("data2.dat", x=1, y=2), [graph.style.line()]) > > > > g.insert(h, [trafo.translate(0, g.bbox().bottom()h.bbox().top()0.5)]) > > g.writePDFfile("minimal") > >  Michael 
From: André Wobst <wobsta@us...>  20100706 14:07:46
Attachments:
smime.p7s

Hi, Am 06.07.2010 um 13:48 schrieb Michael SCHINDLER: > I am even calling g.finish, which does the g.dodata if I am correctly > informed. So, the answer would be no, it does not solve the issue. Sorry, didn't see it; you're right. I just found in the code, that this feature is only enforced within a single graph only, as the axes are not signaled when the layout is fixed. I don't yet know how this should be changed ... have to think about it ... André  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/ 