Using PyPlot in JuliaPro


I am using JuliaPro on Windows 7, which runs Julia 0.5.1.
If I paste

using Plots
pyplot() # Switch to using the PyPlot.jl backend
plot(rand(5,5),linewidth=2,title="My Plot B")

in the REPL, I get a new pane with a plot. If however I have the same code in a file and press “Run File”, the file is executed, but no plot appears. What did I miss?

I’m not familiar with Plots but PyPlot has an interactive plotting setting which might be the cause of this. Does this work?

using Plots
ion() # Interactive Plotting ON
plot(rand(5,5),linewidth=2,title="My Plot B")

The opposite function is ioff().

That didn’t work, unfortunately.

But I found an acceptable solution for now: if my script ends with
then JuliaPro opens a pane named "pyplot_test.png" which displays the plot.


Evaluate File basically does the same as include(file) at the REPL, which doesn’t show plots (or output in general) either, except for the last line.
Explicitly calling display(plot(...)) or similar should work however (I didn’t test that with PyPlot though).