matplotlib - Python real-time updating plot with multiple (configurable) figures and multiple (configurable) subplots -
i'm trying create configurable number of figures , configurable number of subplots on each figure. , go retrieve data once minute or , update plots.
if plot.show() plot comes , seems wait figures close before executing other lines of code. can't tell wait minute , replot.
if go fig.show() comes , closes quickly.
so i'm @ loss how have plot stays open minute or (would configure) , updates. , needs done configurable number of figures , subplots.
i've been working in pyplot , keep trying define 2-d array of line objects. think i'm going wrong way since want replot data every minute or so.
here more details of i'm working on:
1) have zip files filled xml data gets updated in real time (once minute xml data added zip file day 2) want find xml data , write new data sqlite db 3) find data in sqlite db , make plot of it. 4) number of figures needs configurable (1 or 2 @ moment perhaps more in future) , number of subplots on each figure should configurable. 5) in real-time, find new data , replot or animate it.
1 - 4 done , can plot data designated periods of time... not replot it.
hope made sense. in advance.
your design getting stuck because trying 2 tasks in 1 thread: showing gui, , updating background data it. gui in python takes entire thread run itself, why program stops, or "blocks" continuing on when call function. need use matplotlib's "non-blocking" features allow program update. this similar stack overflow question offers several answers explaining how use concept of non-blocking plot.