4 # a xy-graph has linear x and y axes by default
5 # they might be overwritten and futher axes might be added as well
6 g
= graph
.graphxy(width
=8, y
=graph
.axis
.log(), y2
=graph
.axis
.lin(),
7 y3
=graph
.axis
.lin(min=0, max=1),
8 y4
=graph
.axis
.lin(min=0, max=2))
10 # we generate some data and a function with multiple arguments
11 d
= [[i
, math
.exp(0.8*i
+random
.random())] for i
in range(1,10)]
14 g
.plot(graph
.data
.points(d
, x
=1, y
=2))
15 g
.plot(graph
.data
.function("y2(x)=f(x, 1)", context
=locals()))
17 g
.plot(graph
.data
.function("x(y3)=5+sin(2*pi*y3)"))
18 g
.plot(graph
.data
.function("x(y4)=5+sin(2*pi*y4)"))
20 g
.writeEPSfile("manyaxes")
21 g
.writePDFfile("manyaxes")