Output a plot with makie without opening a separate window

When I run this and send the output to a web app (Blink) I get the plot in the webapp, but also a separate window opening! Is there a way of not opening the actual plot window?

Makie.lines(x)

In Plots.jl the window only appears when it’s returned in the REPL, or you specifically call display().

1 Like

AbstractPlotting.inline!(true) should do the trick!

1 Like

I’m not sure that’s a good way to do this. If I set that in a package the user wont be able to plot anything separately.

There needs to be a way of choosing the display that isn’t global. Why isn’t the Plots.jl behaviour workable?

What is the Plots behaviour?

I’ve never investigated what the mechanism is as it just works. But the output of plot() that is passed to Blink etc. outputs a png or svg that displays in the electron window, and doesn’t open a separate window when it is displayed.

In Makie it outputs the png which appears in the electron window, but also opens a separate plot window.