As I noted when I explained this solution to him in the Gitter, I think this should be explained here: http://docs.julialang.org/en/release-0.4/manual/noteworthy-differences/. This is a feature for a good reason. It's the same feature that makes it so that you don't have to add semicolins everywhere, i.e. that there are environments where things are not printed to the REPL by default (plots are printed via sending the object to the REPL). For example, if you execute an entire script (either via Juno, or by julia script.jl), it doesn't print your non-semicolon'd text (thank god), and for the same reason it won't make the plots. To show either, you have to display with with display(), show(), print(), etc.
I think you'll learn to love this feature because it makes everything uniform and predictable. Everything is treated the same. In MATLAB, if you use a nested function vs not a nested function, there are differences as to whether it will show for a reason, because there's hardcoded workaround for if it's not a nested function, or nested in a parfor, etc. However, I agree that coming from MATLAB it can be a bit odd since MATLAB chose the "obvious way a newbie would expect it to work" (until it doesn't, nested in loops / functions too far, prints to fast, etc...) whereas Julia chose the "maybe non-obvious but uniform" approach with plots being treated the same way as everything else. Again, this same feature also allows you to not have to put semicolons at the end of every line of a script, which I enjoy. On Sunday, May 22, 2016 at 3:50:44 PM UTC-7, Tom Breloff wrote: > > I still think this is a documentation issue, if anything. Julia is not > Matlab (in a good way) and we shouldn't be forced to match their > conventions. If you have suggestions for documentation language, please > post it! > > On Sunday, May 22, 2016, Steven G. Johnson <[email protected] > <javascript:>> wrote: > >> PyPlot (by default) opens a window in the REPL, plots inline in IJulia, >> and is non-interactive (waits for an explicit, blocking show() call to open >> a window) when run via "julia somescript.jl" ... is that what you want? > >
