GR interactivity in Pluto

I have found this post

I have downloaded the example notebook pluto_ex.jl

But I got this error

UndefVarError: init_pluto not defined

in this cell

	ENV["GRDISPLAY"] = "pluto"
	using GR

I can’t help with that error but I will point out that Plotly interactivity (panning, zooming, etc.) does work within Pluto and in exported html files from Pluto. I use it is as follows:

    using Plots

Which GR run-time version are you using? Please try to update and rebuild GR:

ENV["GRDIR"] = ""
] build GR

Not sure if it’s just a different manifestation of the same error reported by the OP, but what I get is a popup:

I did try the suggestion above to rebuild GR.

GR is the default plotting backend for Plots.jl and this works fine in Pluto for me.
Plus I can switch to Plotly if interactivity is needed.

Is there any advantage to use GR.jl directly, e.g. functionality not available over Plots.jl?

GR v0.51.0

after GR rebuild the error is still there

Support for Pluto was introduced in GR 0.51.2. Please update GR to 0.52.0 …

GRUtils hold my GR version back.

Now I have 0.52.0 version. Unfortunately, I have now this error:

JSTerm (GR) not initialized. Run GR.js.init_pluto() at the end of a codecell

That’s strange. When I downgrade Pluto to v0.11.14 ( ] add Pluto#v0.11.14 ) it works. There must be something different in v0.12.4. We have to checks this …

@fonsp: Any idea where to start?

Hi, this should be already solved.

The problem should be fixed in GR#master. Thanks to @mteser.

1 Like

Good to hear! @jheinen would you like to call sometime about further Plots.jl + pluto integration?

1 Like

Thanks for the fix. Any chance to get it working in VS Code plot pane?

1 Like