How do I install backends for Plots.jl

How do I install a backend for Plots.jl? I wanted to try PGFPlotsX, to see if it would allow easier editing in LaTeX

julia> Pkg.add("PGFPlotsX")

Source:

Ok I have it installed but:

using PGFPlotsX
PGFPlotsX()

results in the error

ERROR: MethodError: objects of type Module are not callable
Stacktrace:
 [1] top-level scope at REPL[9]:100:

The Plots backend use a lowercase function to activate a backend. Maybe try pgfplotsx()?

You don’t need to load the backend package, just using Plots; pgfplotsx()

As always reading the docs is a good idea, they include examples https://docs.juliaplots.org/latest/backends/

1 Like

Ok thanks, that will be good for trying different options, So far I think GR is faster, PGFPlotsX though works in TexCentric, such that I can see what I’m working on. I think I’m going to end up using Unicode when working, then change the backend, so I can put it all in all as Markdown, and change when I’m ready to export my markdown as TeX.