|
From: zunbeltz <zun...@gm...> - 2014-06-27 07:59:45
|
I have a script that fetchs data from a database and plot using something similar to fig, (ax1, ax3) = plt.subplots(2, 1, sharex=False, sharey=False, num=fignum) ax1.errorbar(...) title(...) ax2 = ax1.twiny() ax4 = ax2.twiny() ... plt.legent() plt.draw() Then, I call this script with plt.ion() and I use plt.show(block=True); so the plot stays opened. Now, I want to rerun the script every second to get the updated data from the database. Is it posible to have the plot no blocking the script and being refresh? I try to use block=False but this makes that the plot is not shown. I want to change my original script as little as possible. One posible idea I have is to pickle the plot (in the original script); and use another script that opens the pickled file every second. TIA Zunbeltz (posted unsuccessfully at stackoverflow) |