further 3d work
[PyX/mjg.git] / test / functional / test_graph3dloop.py
blob6a20bebc4035873bea8301d184cbf1e45e16933f
1 #!/usr/bin/env python
2 import sys; sys.path[:0] = ["../.."]
4 from pyx import *
6 p = lambda phi: graph.graphxyz.central(10, phi, 10)
7 # p = lambda phi: graph.graphxyz.parallel(phi, 10)
9 d = document.document()
10 phi = 0.123
11 while phi < 360:
12 print phi
13 c = canvas.canvas()
14 g = c.insert(graph.graphxyz(10.5, 10, size=6, projector=p(phi),
15 x=graph.axis.lin(painter=graph.axis.painter.regular(gridattrs=[])),
16 y=graph.axis.lin(painter=graph.axis.painter.regular(gridattrs=[])),
17 z=graph.axis.lin(painter=graph.axis.painter.regular(gridattrs=[]))))
18 g.plot(graph.data.values(x=[0, 0, 0, 1], y=[0, 0, 1, 1], z=[0, 1, 0, 1], color=[0, 0.33, 0.67, 1]),
19 [graph.style.surface(index1=1, index2=2)])
20 g.dodata()
21 d.append(document.page(c))
22 phi += 5.67
24 d.writePSfile("test_graph3dloop")