PyPlot not working

question

#1

I am trying the example codes as below:

using PyPlot
x = linspace(0, 10, 200)
y = sin.(x)
plot(x, y, "b-", linewidth=2)

I got the error message:

ArgumentError: haskey of NULL PyObject
haskey(::PyCall.PyObject, ::String) at PyCall.jl:293
#plot#85(::Array{Any,1}, ::Function, ::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}, ::Vararg{Any,N} where N) at PyPlot.jl:169
(::PyPlot.#kw##plot)(::Array{Any,1}, ::PyPlot.#plot, ::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}, ::Vararg{Any,N} where N) at <missing>:0
(::Atom.##63#66)() at eval.jl:104
withpath(::Atom.##63#66, ::Void) at utils.jl:30
withpath(::Function, ::Void) at eval.jl:38
macro expansion at eval.jl:103 [inlined]
(::Atom.##62#65{Dict{String,Any}})() at task.jl:80