Pkg.add("BackendPackage") issue

Following the instruction on this page, I tried to install the package BackendPackage. I was bounced back by

unknown package BackendPackage

Is this package deprecated or obsolete?

The document says you should install correct backend package and Pkg.add("BackendPackage") only serves as an example how to install them. Available backends are GR, Plotly, PyPlot. So you should do something like Pkg.add("GR").

1 Like

Thanks! I see.

Writing the explicit sting “BackendPackage” is definitely confusing and bad practice.

1 Like

Could you make a PR to PlotsDocs.jl then? I thought it was pretty clear that it was a fake backend package (but from this issue I guess it’s not).

When we started plotting above, our plot used the default backend. The default backend depends on what plotting packages you’ve installed in Julia. If have not previously installed any backend packages, this will plot to the browser using Plotly, or into the REPL using UnicodePlots.jl. However, let’s say we want a standard plotting backend which will plot into a nice GUI or into the plot pane of Juno. To do this, we’ll need a backend which is compatible with these features. Some common backends for this are PyPlot and GR. To install these backends, simply use the standard Julia installation (Pkg.add(“BackendPackage”)). We can specifically choose the backend we are plotting into by using the name of the backend in all lower case as a function. Let’s plot the example from above using Plotly and then GR (this assumes you’ve done Pkg.add(“GR”)!):

I guess a newbie like myself can hardly tell that BackendPackage here is just a placeholder. Actually, I thought it’s a package by installing which you get all popular backends.

I thought the correct way to indicate it’s a fake backend package is to use italic fonts (I think I came across a few examples), but how to do that with markdown in code fences?

Well if anyone has a suggestion for how to make this better, just submit a PR which edits this page:

1 Like