# Plot won't show up though there is no error

**URL:** https://discourse.julialang.org/t/plot-wont-show-up-though-there-is-no-error/11490
**Category:** New to Julia
**Tags:** plotting, pyplot, pycall
**Created:** [June 6, 2018, 11:12pm UTC](https://discourse.julialang.org/t/plot-wont-show-up-though-there-is-no-error/11490 "2018-06-06T23:12:03Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![kirbiyik](https://avatars.discourse-cdn.com/v4/letter/k/b2d939/32.png) [@kirbiyik](https://discourse.julialang.org/u/kirbiyik)
#### Post date: [June 6, 2018, 11:12pm UTC](https://discourse.julialang.org/t/plot-wont-show-up-though-there-is-no-error/11490/1 "2018-06-06T23:12:03Z")

</div>

I am trying to make a simple plotting with this code provided in documents:

```julia
using PyPlot
pyplot()
x = linspace(0,2*pi,1000); y = sin.(3*x + 4*cos.(2*x))
plot(x, y, color="red", linewidth=2.0, linestyle="--")

```

I only get this output

```julia
1-element Array{PyCall.PyObject,1}:
 PyObject <matplotlib.lines.Line2D object at 0x11cf36b90>

```

I have this problem on a Jupyter Notebook but plot shows up in terminal. Things that I’ve checked so far:  
I suspect there is something with interactive mode and gui but I don’t have much knowledge on them. I have both tried ioff and ion before calling however nothing changes.  
When I run gcf() after plot, it succesfully shows up. Yet, I think I should be able to do plot without this gcf().

I can provide additional debug info if the necessary command is given.

---

<div class="post-metadata">

### Author: ![mzaffalon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mzaffalon/32/214168_2.png) [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)
#### Post date: [June 7, 2018, 4:18am UTC](https://discourse.julialang.org/t/plot-wont-show-up-though-there-is-no-error/11490/2 "2018-06-07T04:18:44Z")

</div>

Can you try without `pyplot()`? As far as I understand, this is a `Plots.jl` command, not `PyPlot.jl`.

---

<div class="post-metadata">

### Author: ![Daneel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daneel/32/175_2.png) [@Daneel](https://discourse.julialang.org/u/Daneel)
#### Post date: [June 7, 2018, 6:31am UTC](https://discourse.julialang.org/t/plot-wont-show-up-though-there-is-no-error/11490/3 "2018-06-07T06:31:07Z")

</div>

Try `ioff()` after `using PyPlot`. It turns interactive plotting off, which as of the last time I used Jupyter was necessary for inline plotting. I think `gcf()` might still be necessary at the end.
