Why plots do not display in the VSCode Julia Plots pane when I run my program?

Today I tried plotting for the first time with Julia. I installed the Plots package and was able to generate some plots. Things are not going as smoothly as I expected. When I plot from the REPL the plot shows in the VSCode Julia plot pane but when I start Julia by typing Ctrl+F5 the plot pops up in a windows titled GKS Qt Term and disappears when the program stops executing. The code is identical in both cases:

z = [x^2 for x in 1:0.1:10]
p = Plots.plot(z)

Is there a way to plot to the Julia Plots pane when running a program using Ctrl+F5?

Linking related thread.

The link you gave is useful, this has been bothering me for a long time, the picture will be displayed in the GKS Qt Term or julia window, and other kinds …

1 Like