# PyPlot plots to figure window from IJulia. Why is this happening?

**URL:** <https://discourse.julialang.org/t/pyplot-plots-to-figure-window-from-ijulia-why-is-this-happening/86851>\
**Category:** Jupyter-Notebook\
**Created:** [September 6, 2022, 6:15pm UTC](https://discourse.julialang.org/t/pyplot-plots-to-figure-window-from-ijulia-why-is-this-happening/86851 "2022-09-06T18:15:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ctkelley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ctkelley/32/10684_2.png) [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Post date:** [September 6, 2022, 6:15pm UTC](https://discourse.julialang.org/t/pyplot-plots-to-figure-window-from-ijulia-why-is-this-happening/86851/1 "2022-09-06T18:15:51Z")

</div>

Running v1.8.0 on an M2 macbook air. When I fire up a notebook and use PyPlot to make a plot, the figure appears in a figure window, not as part of the notebook.

I have tried rebuilding my environment from scratch and the problem persists.

This does not happen on my Intel Mac. I also think everything was working fine last week. Has some new happened to IJulia or PyPlot? Both the intel and M2 are running PyPlot v2.11.0 and IJulia v1.23.3

MWE: Start a new notebook. Type this into the first code cell

`x=0:.01:pi; y=sin.(x); using PyPlot; plot(x,y)`

and see if the plot goes where it’s supposed to.

---

<div class="post-metadata">

**Author:** ![ctkelley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ctkelley/32/10684_2.png) [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Post date:** [September 6, 2022, 6:37pm UTC](https://discourse.julialang.org/t/pyplot-plots-to-figure-window-from-ijulia-why-is-this-happening/86851/2 "2022-09-06T18:37:17Z")

</div>

Seems that my startup.jl file has caused the problem. Having  
`using PyPlot`  
in there got IJulia really confused. Now when I run the code cell the `using PyPlot` command generates some annoying output

```julia
 Info: Installing matplotlib via the Conda matplotlib package...
└ @ PyCall /Users/ctk/.julia/packages/PyCall/ygXW2/src/PyCall.jl:719
┌ Info: Running `conda install -y matplotlib` in root environment
└ @ Conda /Users/ctk/.julia/packages/Conda/x2UxR/src/Conda.jl:127
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done

# All requested packages already installed.

Retrieving notices: ...working... done

```

but everything works.

---

<div class="post-metadata">

**Author:** ![ctkelley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ctkelley/32/10684_2.png) [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Post date:** [September 6, 2022, 7:42pm UTC](https://discourse.julialang.org/t/pyplot-plots-to-figure-window-from-ijulia-why-is-this-happening/86851/3 "2022-09-06T19:42:40Z")

</div>

The annoying message came from a different line in my startup.jl file. I do research in mixed precision computations and had been playing with this

```julia
set_zero_subnormals(true)

```

and commenting that out got PyPlot to start without the annoying message.
