Plotting with plotnine opens many windows
Quite a while a ago I posted this issue: https://stackoverflow.com/questions/58627447/plotting-with-plotnine-opens-many-windows
It still is unresolved for me and has lead me to not use plotnine. This is kind of a bummer and I would like to kindly ask for help here.
By now I am using Kubuntu 20.04 and Python 3.8.
Have you tried using a tried switching to a different matplotlib backend: https://matplotlib.org/2.0.2/faq/usage_faq.html#what-is-a-backend
Please include a minimal reproducible example.
Hey,
I think I had a similar problem a while back and for me, it helped to wrap the ggplot function in a print statement
@has2k1 A minimal example would be:
import pandas as pd
measurements = pd.DataFrame({'time': [0,1], 'value': [2,3]})
import plotnine as p
p.ggplot(p.aes('time', 'value'), measurements) + p.geom_line()
plotnine uses Qt. I do not get black windows, but the issue remains (as in the original stackoverflow post) that running a line, such as a = 2+2 produces also plots, without an error message.
Wrapping the last line (in the minimal example) in print(), as @Classiks suggests, does help though.
I cannot reproduce this in the notebook, terminal or qtconsole!
@has2k1 I have been running this in PyCharm. At a panel to the right one sees the plots that are being made in the background.
@has2k1 I have been running this in PyCharm. At a panel to the right one sees the plots that are being made in the background.
That mean it is the same as #137.
@has2k1 It does sounds like #137, indeed.