Hello, I am wondering how to do non-blocking plot:
using PyCall; plt = pyimport("matplotlib.pyplot"); plt.plot([1,2]); plt.show()
shows plot window, but Julia is blocked, till I close plot window;
plt.show(block = false)
does not block Julia, but does block plot GUI window, and I need to do plt.pause(5)
to update plot window and use its GUI buttons (to process event loop) and during that Julia REPL is blocked, then after 5 s GUI is again blocked.
Could it be possible to pycall interactive plot without blocking GUI or Julia? In Python plt.show(block = false)
does work for this. Maybe use of multiple threads? P.S. @async doesn’t help.
I use pycall to call matplotlib because it has quite low compile latency (Julia v1.1).