Hi André, Thanks for your work!
If I understand your patch correctly it allows setting the z-coordinate at which the x- and y-axes are plotted; i.e., the x-y-plane can be shifted up and down along the z-axis. What I wanted to achieve was actually getting the z-axis to pass through (x,y)=(0,0) (instead of (xmin,ymin)), i.e. shifting the z-axis around. What I ended up doing in my application was: switch off the axes and draw a grid (which is actually grid planes in the 3D case rather than grid lines) at manually specifed ticks (at 0). About svn: I had been following svn with git-svn for quite a while, which wasn't always a smooth experience each time a release was tagged. You lost me with the tree massacre^Wmassage that happened during the switch to py3. I may re-try a conversion some day, but in addition to the git-svn pain, it would mean having to switch to py3 just for pyx. And figuring out a good she-bang for my existing pyx scripts so that they are run with py2 andpyx 0.11. That's also the reason why you haven't seen patches from me in a while. In any case, thanks for the efforts. This particular use case came up when I had to redo an illustration, where someone had a low res pixel snapshot of the output from some other tool. Redoing it in PyX quality was fun :) Michael André Wobst schrieb am 06.02.2015 um 15:26: > Hi Michael, > > it actually is not that complicated, but needs a patch. Please find it > enclosed, I'll add it to svn HEAD as well. > > I added two parameters xy12axesat and xy12axesatname, the later defines the z > axis to be used to set the xy12 plane height. I used the bar.py example from > the 3d graphs on the website with the following modification and needed this > additional parameter there. It now is: > > #!/usr/bin/env python > from pyx import * > > g = graph.graphxyz(0, 0, size=5, x=graph.axis.bar(), y=graph.axis.bar(), > xy12axesat=0, xy12axesatname="z2", z=None, z2=graph.axis.lin()) > g.plot(graph.data.data(graph.data.points([[1, 1, 1.4], [1, 2, 1.8], [2, 1, > -0.5], [2, 2, 0.9]]), xname=1, yname=2, z2=3), > [graph.style.barpos(fromvalue=0, frompathattrs=None), > graph.style.bar(barattrs=[style.linejoin.bevel])]) > g.writePDFfile() > > and does what you want. If you apply the attached patch or switch to svn head > after my check-in, you should simple be able by the new parameters to shift > the xy12 plane as requested. > > Best, > > > André > > Am 04.02.2015 um 11:00 schrieb Michael J Gruber > <[email protected]>: > >> Hi there, >> >> I'd like to shift the position of an axis in a 3D graph. Specifically, I >> want the z-axis in a graphxyz to go through (0,0) in the x-y-plane. >> >> graphxy has xaxisat etc., but graphxyz hasn't. I've been trying to wrap >> my head around the documention and even the code for axisatv(), but I >> don't even see when and where to call that in the graphxy case, let >> alone how to achieve the same effect for graphxyz. >> >> Any help would be much appreciated. >> >> (I'm plotting parametric curves, though that should not matter.) >> >> Michael ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ PyX-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pyx-user
