# GLMakie plotting in VSCode?

**URL:** https://discourse.julialang.org/t/glmakie-plotting-in-vscode/100057
**Category:** Visualization
**Tags:** glmakie
**Created:** [June 8, 2023, 2:28pm UTC](https://discourse.julialang.org/t/glmakie-plotting-in-vscode/100057 "2023-06-08T14:28:30Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![HenriDeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrideh/32/8316_2.png) [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)
#### Post date: [June 8, 2023, 2:28pm UTC](https://discourse.julialang.org/t/glmakie-plotting-in-vscode/100057/1 "2023-06-08T14:28:30Z")

</div>

Hello,

I just updated my project’s dependencies and suddenly GLMakie displays my interactive plots in VSCode’s plot pane. Both Makie and GLMakie are at the latest versions. Was there any change as to how VSCode or GLMakie treats GLMalkie Screens ?

---

<div class="post-metadata">

### Author: ![HenriDeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrideh/32/8316_2.png) [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)
#### Post date: [June 8, 2023, 2:33pm UTC](https://discourse.julialang.org/t/glmakie-plotting-in-vscode/100057/2 "2023-06-08T14:33:17Z")

</div>

Basically, this MWE used to open a window, now it does not if you enter this in VSCode’s REPL:

```julia
julia> Pkg.activate(temp=true)
  Activating new project at `C:\Users\Henri\AppData\Local\Temp\jl_KqLPC6`

julia> Pkg.add("GLMakie"); using GLMakie; lines(rand(10))

```

It still opens a window if used in a standard terminal like powershell.

---

<div class="post-metadata">

### Author: ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)
#### Post date: [June 8, 2023, 3:08pm UTC](https://discourse.julialang.org/t/glmakie-plotting-in-vscode/100057/3 "2023-06-08T15:08:31Z")

</div>

> <https://github.com/MakieOrg/Makie.jl/issues/2956>
>
> In the most recent update (GLMakie 0.8.5 on Julia version 0.9.0) GLMakie no long…er opens a separate window when executing from a file in Visual Studio Code (Julia extension also on the latest version). Instead, plots open in a new tab in VS Code, like CairoMakie. I tested with a new environment with only GLMakie installed and generating a blank \`Figure()\`. I'm not sure if it's a Makie or VSC problem.

---

<div class="post-metadata">

### Author: ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)
#### Post date: [June 8, 2023, 4:05pm UTC](https://discourse.julialang.org/t/glmakie-plotting-in-vscode/100057/4 "2023-06-08T16:05:22Z")

</div>

That’s actually amazing 😍 Thanks for making me discover it

---

<div class="post-metadata">

### Author: ![HenriDeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrideh/32/8316_2.png) [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)
#### Post date: [June 8, 2023, 8:07pm UTC](https://discourse.julialang.org/t/glmakie-plotting-in-vscode/100057/5 "2023-06-08T20:07:43Z")

</div>

Okay thank you. I don’t mind the change really but I think a warning message on package loading could be a simple way to tell users that this is not a bug. Because there’s no reason to interpret that as an intended change. It would also avoid you the burden of the many of us asking the question :s

---

<div class="post-metadata">

### Author: ![user664303](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/user664303/32/37843_2.png) [@user664303](https://discourse.julialang.org/u/user664303)
#### Post date: [June 8, 2023, 8:43pm UTC](https://discourse.julialang.org/t/glmakie-plotting-in-vscode/100057/6 "2023-06-08T20:43:45Z")

</div>

I too noticed this. Thanks for explanation, @sdanisch . As some people mentioned in the GitHub issue, this is undesired behaviour when your plot is interactive. I notice you suggest a solution:

> You can force it to always open a window by either disabling the plotpane or running `GLMakie.activate!(inline=false)`

Placing `GLMakie.activate!(inline=false)` directly before `fig = Figure()` fixed the issue for me. Thanks again.

---

<div class="post-metadata">

### Author: ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)
#### Post date: [May 7, 2024, 1:00pm UTC](https://discourse.julialang.org/t/glmakie-plotting-in-vscode/100057/7 "2024-05-07T13:00:24Z")

</div>

I found this thread on Google having the opposite problem. So just to be sure, Makie (unlike Plots) defaults to opening separate windows for figures and does not use the VSCode plot pane by default, and if I want to use it I have to add `GLMakie.activate!(inline=true)` to my scripts?

---

<div class="post-metadata">

### Author: ![Ahmed\_Salih](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ahmed_salih/32/206579_2.png) [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)
#### Post date: [May 7, 2024, 5:44pm UTC](https://discourse.julialang.org/t/glmakie-plotting-in-vscode/100057/8 "2024-05-07T17:44:22Z")

</div>

You might have seen it already, but last message in thread:

> <https://github.com/MakieOrg/Makie.jl/issues/2956#issuecomment-1650589556>
>
> In the most recent update (GLMakie 0.8.5 on Julia version 0.9.0) GLMakie no long…er opens a separate window when executing from a file in Visual Studio Code (Julia extension also on the latest version). Instead, plots open in a new tab in VS Code, like CairoMakie. I tested with a new environment with only GLMakie installed and generating a blank \`Figure()\`. I'm not sure if it's a Makie or VSC problem.

States that the intended behaviour is now to by default open a new window, so yes, you would have to do the opposite.

Kind regards

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)
#### Post date: [May 8, 2024, 10:27am UTC](https://discourse.julialang.org/t/glmakie-plotting-in-vscode/100057/9 "2024-05-08T10:27:09Z")

</div>

It’s not Makie, it’s GLMakie. Because it is the only backend that has its own windows and it has far fewer features if it opts to use any other displays from the display stack. The other backends just use the display stack. `Makie.inline!(true)` effectively means “use the display stack”

---

<div class="post-metadata">

### Author: ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)
#### Post date: [May 8, 2024, 11:25am UTC](https://discourse.julialang.org/t/glmakie-plotting-in-vscode/100057/10 "2024-05-08T11:25:29Z")

</div>

Ah, I guess last time I tried Makie I was using CairoMakie, that’s probably why I was surprised. What features do I lose when using the display stack?

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)
#### Post date: [May 8, 2024, 11:55am UTC](https://discourse.julialang.org/t/glmakie-plotting-in-vscode/100057/11 "2024-05-08T11:55:50Z")

</div>

In glmakie? All interactivity, it just gives you pngs then

---

<div class="post-metadata">

### Author: ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)
#### Post date: [May 8, 2024, 12:22pm UTC](https://discourse.julialang.org/t/glmakie-plotting-in-vscode/100057/12 "2024-05-08T12:22:33Z")

</div>

I never noticed that they were interactive 😃
