4 class phasecolorsurface(graph
.style
.surface
):
6 def midcolor(self
, *c
):
7 return math
.atan2(sum([math
.sin(x
) for x
in c
]), sum([math
.cos(x
) for x
in c
]))
9 g
= graph
.graphxyz(size
=3.5, zscale
=0.3, projector
=graph
.graphxyz
.central(3, 25, 8),
10 x
=graph
.axis
.lin(painter
=None),
11 y
=graph
.axis
.lin(painter
=None),
12 z
=graph
.axis
.lin(painter
=None),
14 g
.plot(graph
.data
.file("example.dat", x
=1, y
=2, z
=3, color
=4), [phasecolorsurface(gradient
=color
.rgbgradient
.Rainbow
, coloraxis
=graph
.axis
.lin(min=-math
.pi
, max=math
.pi
), backcolor
=color
.rgb
.black
, keygraph
=None)])
15 g
.writeEPSfile("example")