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/function.jl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 examples/graphs/function.jl (limited to 'examples/graphs/function.jl') diff --git a/examples/graphs/function.jl b/examples/graphs/function.jl new file mode 100644 index 0000000..e995855 --- /dev/null +++ b/examples/graphs/function.jl @@ -0,0 +1,16 @@ + +# Original Python: +# from pyx import * +# +# g = graph.graphxy(width=8) +# g.plot(graph.data.function("y(x)=sin(x)/x", min=-15, max=15)) +# g.writeEPSfile("function") +# g.writePDFfile("function") +# g.writeSVGfile("function") + +using PyX + +g = graph.graphxy(width=8) +plot(g, graph_data_function("y(x)=sin(x)/x", min=-15, max=15)) +writeEPSfile(g, "function") +writePDFfile(g, "function") -- cgit v1.2.3