From 439655aaa40568acd0b4f536e67f6b90031ee147 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sun, 21 Feb 2016 14:09:55 -0800 Subject: add examples (all ports from PyX 0.14.1) --- examples/graphs/lissajous.jl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 examples/graphs/lissajous.jl (limited to 'examples/graphs/lissajous.jl') diff --git a/examples/graphs/lissajous.jl b/examples/graphs/lissajous.jl new file mode 100644 index 0000000..e66ca04 --- /dev/null +++ b/examples/graphs/lissajous.jl @@ -0,0 +1,17 @@ + +# Original Python: +# from math import pi +# from pyx import * +# +# g = graph.graphxy(width=8) +# g.plot(graph.data.paramfunction("k", 0, 2*pi, "x, y = sin(2*k), cos(3*k)")) +# g.writeEPSfile("lissajous") +# g.writePDFfile("lissajous") +# g.writeSVGfile("lissajous") + +using PyX + +g = graph.graphxy(width=8) +plot(g, graph_data.paramfunction("k", 0, 2*pi, "x, y = sin(2*k), cos(3*k)")) +writeEPSfile(g, "lissajous") +writePDFfile(g, "lissajous") -- cgit v1.2.3