From b24f282bca4af63982937c10835063d3e6e9eb74 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sun, 21 Feb 2016 18:08:55 -0800 Subject: add many, many more example conversions. still not complete --- examples/splitgraphs/minimal.jl | 25 +++++++++++++++++++++++++ examples/splitgraphs/splitatvalue.jl | 23 +++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 examples/splitgraphs/minimal.jl create mode 100644 examples/splitgraphs/splitatvalue.jl (limited to 'examples/splitgraphs') diff --git a/examples/splitgraphs/minimal.jl b/examples/splitgraphs/minimal.jl new file mode 100644 index 0000000..e0e85cf --- /dev/null +++ b/examples/splitgraphs/minimal.jl @@ -0,0 +1,25 @@ +# Original Python: +# from pyx import * + +# g = graph.graphxy(width=8, x=graph.axis.split()) +# g.plot(graph.data.points([((0, 0.1), 0.1), +# ((0, 0.5), 0.2), +# ((0, 0.9), 0.3), +# ((1, 101), 0.7), +# ((1, 105), 0.8), +# ((1, 109), 0.9)], x=1, y=2)) +# g.writeEPSfile("minimal") +# g.writePDFfile("minimal") +# g.writeSVGfile("minimal") + +using PyX + +g = graph.graphxy(width=8, x=graph_axis.split()) +plot(g, graph_data.points([((0, 0.1), 0.1), + ((0, 0.5), 0.2), + ((0, 0.9), 0.3), + ((1, 101), 0.7), + ((1, 105), 0.8), + ((1, 109), 0.9)], x=1, y=2)) +writeEPSfile(g, "minimal") +writePDFfile(g, "minimal") diff --git a/examples/splitgraphs/splitatvalue.jl b/examples/splitgraphs/splitatvalue.jl new file mode 100644 index 0000000..c09d194 --- /dev/null +++ b/examples/splitgraphs/splitatvalue.jl @@ -0,0 +1,23 @@ +# Original Python: +# from pyx import * + +# pf = graph.data.paramfunction + +# g = graph.graphxy(width=8, x=graph.axis.split()) +# g.plot(pf("k", -1, 1, +# "x, y = splitatvalue(k, -0.9, 0.9), k**100", +# points=1000)) +# g.writeEPSfile("splitatvalue") +# g.writePDFfile("splitatvalue") +# g.writeSVGfile("splitatvalue") + +using PyX + +pf = graph_data.paramfunction + +g = graph.graphxy(width=8, x=graph_axis.split()) +plot(g, pf("k", -1, 1, + "x, y = splitatvalue(k, -0.9, 0.9), k**100", + points=1000)) +writeEPSfile(g, "splitatvalue") +writePDFfile(g, "splitatvalue") -- cgit v1.2.3