From: Michael S. <m-s...@us...> - 2010-07-06 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 |