Seamlessly create plots in Julia using the PGFPlots LaTeX package




Documentation Build Status

PGFPlotsX is a Julia package to generate publication quality figures using the LaTeX library PGFPlots.

It is similar in spirit to the package PGFPlots.jl but it tries to have a very close mapping to the PGFPlots API as well as minimize the number of dependencies. The fact that the syntax is similar to the TeX version means that examples from Stack Overflow and the PGFPlots manual can easily be incorporated in the Julia code.

Features include:

  • Showing figures inline in Jupyter notebooks, Juno and VSCode-julia. Both png- and svg-figures can be shown.
  • Exporting to tex, pdf, svg, and png, file formats.
  • Customizing the preamble so that commands from latex packages can be used.
  • Extra functionality when different packages are loaded, for example Colors, DataFrames, Contour etc.

A quite extensive set of examples can be found at the PGFPlotsXExamples repo.


The package is registered in METADATA.jl and so can be installed with Pkg.add.

julia> Pkg.add("PGFPlotsX")


  • STABLEmost recently tagged version of the documentation.
  • LATESTin-development version of the documentation.

TODO:s / Roadmap

  • Add more examples
  • Make the generated LaTeX code pretty printed (more than currently)
  • Add figures to the documentation


Kristoffer Carlsson - @KristofferC89

First Commit


Last Touched

1 day ago


49 commits

Used By: