# PyPlot not working

**URL:** https://discourse.julialang.org/t/pyplot-not-working/7032
**Category:** General Usage
**Tags:** question
**Created:** [November 13, 2017, 4:57am UTC](https://discourse.julialang.org/t/pyplot-not-working/7032 "2017-11-13T04:57:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Yifan\_Liu](https://avatars.discourse-cdn.com/v4/letter/y/4da419/32.png) [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)
#### Post date: [November 13, 2017, 4:57am UTC](https://discourse.julialang.org/t/pyplot-not-working/7032/1 "2017-11-13T04:57:16Z")

</div>

I am trying the example codes as below:

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

```

I got the error message:

```julia
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

```
