Installation

Installation

To work with GPlot, you will need three things:

  1. Julia ≥ 1.0,
  2. the GPlot.jl package,
  3. the GLE engine.

Note: if you intend to use LaTeX, you will also need to have pdflatex.

To install GPlot in Julia, the usual command for unregistered packages applies:

] add https://github.com/tlienart/GPlot.jl

To get GLE working, please follow the instructions further below depending on your OS. After following the instructions, check in Julia that the following command works:

julia> run(`gle -v`)
GLE version 4.2.4c
Usage: gle [options] filename.gle
More information: gle -help
Process(`gle -v`, ProcessExited(0))
Note

If you encounter problems with the instructions below or believe that the instructions could be simplified, please open an issue. Also if you managed to follow the instructions successfully with an OS that's not explicitly in the list below, please let me know and I can add it here.

Juno and IJulia setup

You don't have to use either Juno or IJulia to use GPlot but, if you do, you will be able to see previews of the plots you're generating. These previews are lossy PNGs to increase the speed at which they can be displayed, you should keep that in mind if you see pixel-imperfections in the way curves or fonts are displayed.

In Juno, you should make sure that the option Enable Plot Pane is ticked in the UI Options part of the julia-client settings [Packages -> Julia -> Settings].

GLE on Linux

Tested

Untested

See also the official GLE website.

GLE on MacOS

(There may be a simpler approach but I'm sure this one works and is straightforward.)

The original instructions to install GLE (available here) are reproduced below for convenience:

  1. Get the Ghostscript dmg from sourceforge and copy-paste its content (Ghostscript.framework) in /Library/Frameworks/ (do that even if you already have ghostscript on your machine)
  2. Get the QGLE dmg from sourceforge and put its content in your /Applications/ folder.

Check that the following now works in your terminal:

$> /Applications/QGLE.app/Contents/bin/gle -v
GLE version 4.2.4c
Usage: gle [options] filename.gle
More information: gle -help

The only thing left to do is to copy the right files to /usr/local/ so that gle can be called from Julia easily. When running the following few lines you may get a message saying that the link to libpng already exists, that's fine.

ln -s /Applications/QGLE.app/Contents/bin/gle /usr/local/bin/.
ln -s /Applications/QGLE.app/Contents/bin/glegs /usr/local/bin/.
ln -s /Applications/QGLE.app/Contents/lib/libgle-graphics-4.2.4c.dylib /usr/local/lib/.
ln -s /Applications/QGLE.app/Contents/lib/libpng.dylib /usr/local/lib/.
ln -s /Applications/QGLE.app/Contents/share/gle-graphics/ /usr/local/share/.

Note: you can also copy the files directly using cp instead of ln -s in the lines above and then remove QGLE.app from your computer as GPlot does not need it.

GLE on Windows

I haven't tested GLEs on Windows but there are executables available on the GLE downloads page which should-just-work™ (one has been updated recently).

If you've managed to make things work for you on Windows, please let me know so that I can improve these instructions!