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

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.

1 Like

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

 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.

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

set_zero_subnormals(true)

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