PyPlot.jl
PyPlot.jl copied to clipboard
Displaying plots in vscode
trafficstars
Whenever I try to plot something using PyPlot.jl, nothing is displayed and only a 1-element Vector{PyCall.PyObject}: PyObject <matplotlib.lines.Line2D object at 0x00000274756122C0> element is returned.
I also tried p = plot(...); show(p), and p = plot(...); display(p) but I get nothing.
Plotting with Plots.jl works fine though. Is this a known issue or did I miss something?
I am running julia with vs code, I have julia 1.10 and the latest version of pyplot.jl.
You need to display the Figure object. Use gcf() after your plot command (which returns the current figure object), or display(gcf()).
(See also #530.)