implement central and parallel projection in 3d graphs; correct axis (tick direction...
[PyX/mjg.git] / test / functional / test_graph3d.py
blob21ccad4b7d4f95e778804617018b3c7ec9cd1697
1 #!/usr/bin/env python
2 import sys; sys.path[:0] = ["../.."]
4 import math
5 from pyx import *
7 text.set(mode="latex")
9 def test_minimal(c, x, y):
10 g = c.insert(graph.graphxyz(x, y, size=5))
11 g.plot(graph.data.file("data/husimi_small.dat", x=1, y=2, z=3))
13 def test_line(c, x, y):
14 g = c.insert(graph.graphxyz(x, y, size=5))
15 g.plot(graph.data.file("data/husimi_small.dat", x=1, y=2, z=3), [graph.style.line()])
17 def test_surface(c, x, y):
18 g = c.insert(graph.graphxyz(x, y, size=5))
19 g.plot(graph.data.file("data/husimi_small.dat", x=1, y=2, z=3, color=3), [graph.style.surface(strokelines1=0)])
21 def test_surface2d(c, x, y):
22 g = c.insert(graph.graphxy(x, y, width=5, height=5))
23 g.plot(graph.data.file("data/husimi_small.dat", x=1, y=2, color=3), [graph.style.surface()])
25 c = canvas.canvas()
26 test_minimal(c, 0, 0)
27 test_line(c, 0, -8)
28 test_surface(c, 0, -16)
29 test_surface2d(c, -3, -28)
31 c.writeEPSfile("test_graph3d", paperformat=document.paperformat.A4)
32 c.writePDFfile("test_graph3d", paperformat=document.paperformat.A4)