diff options
author | bnewbold <bnewbold@robocracy.org> | 2016-02-21 14:01:55 -0800 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2016-02-21 14:01:55 -0800 |
commit | 13db261935cd85bc91563999f451bc93081b34de (patch) | |
tree | d2b9a1fa91b0b38681402358f7b2745f470f88d2 /src | |
parent | a1fad974dc49871bc87f8de99cec9f7731099d1a (diff) | |
download | PyX.jl-13db261935cd85bc91563999f451bc93081b34de.tar.gz PyX.jl-13db261935cd85bc91563999f451bc93081b34de.zip |
simple, naive, draft, etc
Diffstat (limited to 'src')
-rw-r--r-- | src/PyX.jl | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/PyX.jl b/src/PyX.jl new file mode 100644 index 0000000..1f7239c --- /dev/null +++ b/src/PyX.jl @@ -0,0 +1,54 @@ + +module PyX + +using PyCall +using LaTeXStrings + +export canvas, path, deco, style, linewidth, linestyle, linejoin +export color, color_rgb, connector, text, box, graph, graph_axis, graph_data, graph_style +export graph_data_function +export epsfile, deformer, trafo +export plot, writeEPSfile, writePDFfile, writeSVGfile + +canvas = pywrap(pyimport("pyx.canvas")) +path = pywrap(pyimport("pyx.path")) +deco = pywrap(pyimport("pyx.deco")) +style = pywrap(pyimport("pyx.style")) +linewidth = pywrap(style.linewidth) +linestyle = pywrap(style.linestyle) +linejoin = pywrap(style.linejoin) +color = pywrap(pyimport("pyx.color")) +color_rgb = pywrap(color.rgb) +connector = pywrap(pyimport("pyx.connector")) +text = pywrap(pyimport("pyx.text")) +box = pywrap(pyimport("pyx.box")) +graph = pywrap(pyimport("pyx.graph")) +graph_axis = pywrap(graph.axis) +graph_data = pywrap(graph.data) +graph_data_function = graph.data[:function] +graph_style = pywrap(graph.style) +epsfile = pywrap(pyimport("pyx.epsfile")) +deformer = pywrap(pyimport("pyx.deformer")) +trafo = pywrap(pyimport("pyx.trafo")) + +function plot(g::PyObject, args...; kwargs...) + return g[:plot](args...; kwargs...) +end + +function writeEPSfile(g::PyObject, args...; kwargs...) + return g[:writeEPSfile](args...; kwargs...) +end + +function writePDFfile(g::PyObject, args...; kwargs...) + return g[:writePDFfile](args...; kwargs...) +end + +function writeSVGfile(g::PyObject, args...; kwargs...) + return g[:writeSVGfile](args...; kwargs...) +end + +# TODO: +# canvas: text(), stroke() +# path: append() + +end # module PyX |