JuliaPy / PyPlot.jl

Plotting for Julia based on matplotlib.pyplot
https://github.com/JuliaPy/PyPlot.jl
MIT License
475 stars 87 forks source link

announce that backend switches based on display capabilities and/or allow override #475

Open goretkin opened 4 years ago

goretkin commented 4 years ago

Even though I've been using PyPlot for a long time, I was caught by surprise today. I'm running it in Juno, but for whatever reason, PyPlot's output was not being displayed in the Juno plot pane. I was trying to manually set the backend, but it gets overriden by the following

https://github.com/JuliaPy/PyPlot.jl/blob/c1943a96b6754134c7ae1e3147d901011aa7326d/src/init.jl#L211-L214

I don't really know a great way to handle this, because the switching behavior is certainly aiming to give a user-friendly it-just-works experience. So perhaps it would just be good to be able to override the override of the backend, regardless of the display capabilities.