Problem with "set_array" function

Try adding a matplotlib.pyplot.pause(0) immediately after your
'self.im.set_array(welldata)'.

The pause forces it to display the changed data.

For anyone who finds this.

···

--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Problem-with-set-array-function-tp39686p46628.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

On further research, I have found a variety of issues with using
matplotlib.pyplot.pause(0), and can't recommend it for this purpose.
matplotlib.pyplot.show() appears to perform the desired function and does
not have as many side effects.

To elaborate, I found that I was leaking memory, probably in 'paused
sessions', for every additional plot displayed that way. This also increased
the stack depth until it hit the python limit and crashed the program.
matplotlib.pyplot.draw() has neither of these issues.

···

--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Problem-with-set-array-function-tp39686p46632.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

As far as I can tell, the code you originally posted should work. I will
note that calling "self.fig.colorbar()" at every tick of the timer is
probably not a good idea. Instead, I would have the initial imshow() set
with hard-coded mins and maxes so that you don't need to update the
colorbar.

When doing embedding like this, you absolutely should avoid utilizing
pyplot, because you may accidentally clash mpl's event loop with the gui's
event loop. Which versions of matplotlib and wxWidgets are you using?

Ben Root

···

On Mon, Jan 11, 2016 at 2:40 AM, eadsjr <jeads442 at gmail.com> wrote:

On further research, I have found a variety of issues with using
matplotlib.pyplot.pause(0), and can't recommend it for this purpose.
matplotlib.pyplot.show() appears to perform the desired function and does
not have as many side effects.

To elaborate, I found that I was leaking memory, probably in 'paused
sessions', for every additional plot displayed that way. This also
increased
the stack depth until it hit the python limit and crashed the program.
matplotlib.pyplot.draw() has neither of these issues.

--
View this message in context:
http://matplotlib.1069221.n5.nabble.com/Problem-with-set-array-function-tp39686p46632.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users at python.org
https://mail.python.org/mailman/listinfo/matplotlib-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20160115/0bbaf7d4/attachment.html>