aboutsummaryrefslogtreecommitdiffstats
path: root/examples/splitgraphs
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2016-02-21 18:08:55 -0800
committerbnewbold <bnewbold@robocracy.org>2016-02-21 18:08:55 -0800
commitb24f282bca4af63982937c10835063d3e6e9eb74 (patch)
treefd8c58601beb3964ccecf4709f7b28944fc1c36b /examples/splitgraphs
parent84572be10cdfc852530787a5dc78ddef3e0f23cd (diff)
downloadPyX.jl-b24f282bca4af63982937c10835063d3e6e9eb74.tar.gz
PyX.jl-b24f282bca4af63982937c10835063d3e6e9eb74.zip
add many, many more example conversions. still not complete
Diffstat (limited to 'examples/splitgraphs')
-rw-r--r--examples/splitgraphs/minimal.jl25
-rw-r--r--examples/splitgraphs/splitatvalue.jl23
2 files changed, 48 insertions, 0 deletions
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")