I don't know exactly what's going on, but seems that PyPlot's display initialization needs to happen after the ~/.juliarc.jl file is loaded. It doesn't solve your problem properly, but you can do something similar... add "using Plots; pyplot()" to your juliarc.jl and your commands should work (but going through Plots obviously)
On Wed, Jan 20, 2016 at 5:35 AM, Kaj Wiik <[email protected]> wrote: > Hi! > > I have the same problem with > > julia> versioninfo() > Julia Version 0.4.3 > Commit a2f713d (2016-01-12 21:37 UTC) > Platform Info: > System: Linux (x86_64-unknown-linux-gnu) > CPU: Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz > WORD_SIZE: 64 > BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Nehalem) > LAPACK: libopenblas64_ > LIBM: libopenlibm > LLVM: libLLVM-3.3 > > Kaj > > > > On Wednesday, January 20, 2016 at 10:05:51 AM UTC+2, Daniel Carrera wrote: >> >> Hello, >> >> Here is an odd problem. If I put in "using PyPlot" inside my >> ~/.juliarc.jl file, when I start the Julia shell I cannot get any plots. >> There is no error message, just no plot: >> >> $ julia >> ... >> julia> x = linspace(0,2pi); >> julia> y = sin(x); >> julia> plot(x,y) >> 1-element Array{Any,1}: >> PyObject <matplotlib.lines.Line2D object at 0x7fa60a2ed610> >> >> >> But if I remove PyPlot from ~/.juliarc.jl and insert it manually in the >> Julia shell, everything works great. Does anyone know what's happening? >> >> Cheers, >> Daniel. >> >
