various documentation fixes
[PyX.git] / test / functional / test_graph3dloop.py
blob35a7fc7ee285792123a6a85ac0e3249f09dc3518
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 c = canvas.canvas()
13 g = c.insert(graph.graphxyz(10.5, 10, size=6, projector=p(phi),
14 x=graph.axis.lin(painter=graph.axis.painter.regular(gridattrs=[])),
15 y=graph.axis.lin(painter=graph.axis.painter.regular(gridattrs=[])),
16 z=graph.axis.lin(painter=graph.axis.painter.regular(gridattrs=[]))))
17 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]),
18 [graph.style.gridpos(index1=1, index2=2), graph.style.surface(gridcolor=color.gray(0.9))])
19 g.dodata()
20 g.text(2, 2, str(phi))
21 d.append(document.page(c))
22 phi += 5.67
24 d.writePSfile("test_graph3dloop")