Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyQt and matplotlib

I call a matplotlib function plt.show() from an PyQt application. I always have the warning:

QCoreApplication::exec: The event loop is already running

It seems that matplotlib called a new QCoreApplication which is already started How can I do to remove this warning? Thanks

like image 802
nam Avatar asked Mar 17 '26 17:03

nam


1 Answers

If you are not generating multiple plots, the easiest way around is to use plt.ion() before you initialise the figure. Remove plt.show()

like image 54
Sri Avatar answered Mar 20 '26 22:03

Sri



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!