GLMakie in VSCode single plot popout

I like the plot pane in VSCode, and I wish to use it by default. I also love how GLMakie plots scale up and down in size as I ajust the width of the plotting pane.

But sometimes I want to interact with the plot, for data-inspection, panning or zooming. I used to be able to call current_figure() in the buildt-in terminal, and I would get a standalone window that is interactable. Now, it just creates a new plot in the plotting pane.

I know that I can change the backend to WGLMakie to get interactivity in the build-in plotting pane, but

  1. It seems less responsive and stable,
  2. When interacting with a plot, it is nice to have the standalone window fill the screen, and
  3. I prefer not having to juggle two backends.

So is there a way to get a single plot in the standalone window, while still using the buildt-in plot pane by default?

If you call Makie.inline!(true) you get the plot pane, and for false you get the window in GLMakie

Not really, unfortunatly.

When I call

Makie.inline!(false)
current_figure()

from the script, I get a new plot in the plot-pane. So I can not see any difference between calling Makie.inline!(false) and Makie.inline!(true), before calling current_figure() from the script.

When I call

julia> Makie.inline!(false)

julia> current_figure()

in the build in terminal, there is a difference - nothing happens. When I call

julia> Makie.inline!(true)

julia> current_figure()

again, I again get new plots in the plot-pane.

So I appriciate the reply, and it sounds like the right approach, but it was unfortunatly not helpful in my case.

Maybe @sdanisch can explain it better, the display system is a complicated thing.

You can temporarily disable the plot pane, e.g. at

The other option would be to call e.g. display(MakieDisplay(), p) (for some value of MakieDisplay), which should force the display system to circumvent the VSCode display.

The Disable plot pane option was not available from that drop down for me, but I found it via the Ctrl+shift+p thingy (command palette?)

But when I do that, I get nothing happening from the script, and the following from the terminal:

julia> current_figure()
Scene (800px, 600px):
  18 Plots:
    ├ Combined{Makie.poly, Tuple{Vector{Vector{Point{2, Float32}}}}}
    ├ LineSegments{Tuple{Vector{Point{2, Float32}}}}
    ├ LineSegments{Tuple{Vector{Point{2, Float32}}}}
    ├ LineSegments{Tuple{Vector{Point{2, Float32}}}}
    ├ LineSegments{Tuple{Vector{Point{2, Float32}}}}
    ├ LineSegments{Tuple{Vector{Point{2, Float32}}}}
    ├ LineSegments{Tuple{Vector{Point{2, Float32}}}}
    ├ MakieCore.Text{Tuple{String}}
    ├ Lines{Tuple{Vector{Point{2, Float32}}}}
    ├ MakieCore.Text{Tuple{Vector{Tuple{AbstractString, Point{2, Float32}}}}}
    ├ LineSegments{Tuple{Vector{Point{2, Float32}}}}
    ├ LineSegments{Tuple{Vector{Point{2, Float32}}}}
    ├ MakieCore.Text{Tuple{String}}
    ├ Lines{Tuple{Vector{Point{2, Float32}}}}
    ├ MakieCore.Text{Tuple{Vector{Tuple{AbstractString, Point{2, Float32}}}}}
    ├ Lines{Tuple{Vector{Point{2, Float32}}}}
    ├ Lines{Tuple{Vector{Point{2, Float32}}}}
    └ MakieCore.Text{Tuple{String}}
  1 Child Scene:
    └ Scene (734px, 541px)  

So it seems like the fallback IO channel does not work as desired. So I would have to call display with the correct display channel. But I have no idea how to list available IO channels, and a quick google-search got me no further.

Hm, so Makie’s use of the display system is kinda wonky imo.

Anyways, you can switch between the plot pane with GLMakie.inline!(false) to enable it and GLMakie.inline!(true) to disable it.

So I restarted VSCode for unrelated reasons, and now I get the standalone window when sending the plotting-command to the terminal. This is the behaviour described in the original post. Weird…

So then I am back to evaluating lines of a script to send the plot to the plot pane, and sending it to the terminal for interaction.

That sounds buggy. There shouldn’t be any difference between the REPL and inline evaluation.

It indeed feels like a buggy hacky way to do things. But it works great for me.

Reminds me of a meme about some changelog saying a bug was fixed where the CPU would overheat with a certain command, and someone commenting that that was how they liked heating their room without getting up, and asking for a way to keep the old behaviour xD

Yeah, as soon as I figure out why this happens you’ll need to find another way to heat your room.

There it is! Yes, that is the meme xD

Here is a GIF showing the current behaviour, which I like
EUdo3TD9KS