Plots small trouble

Hi, I am learning Julialang on Mac and Windwos.
I have a small trouble in Plots.jl

using Plots, Random
plot(rand(50))

Yes, I can get target graph perfect.

however,

using Plots, Random
plot(rand(50))
println(“test”) # add this line. This line is trouble.

I can not get graph and any warnig on the screen. Just only “test” string.
Does anyone know the reason why I can not get the graph or warning ?

My environment is latest ATOM,Juno Julia 1.4.2 on Mac and Windwos,

I look forward to your kind advice.

It is because only the result of the last line is displayed. You can use display(plot(....)) to show graph.

3 Likes

Dear tomaklutfu,

display(plot(rand(50)))

I never forget your message!!
Thank you very much for your advice.