Hi,

I've run into something that I expect to be ground well covered but I
can't find anything relevant on google.

I'm on linux. When using the GtkAgg backend on matplotlib 1.1.0 (or git
head for that matter), with interactive mode on, one call to draw() only
gives me a blank window, while a second draw() immediately afterwards
will draw the requested graph. On IRC, askewchan told me it only one
draw is required under MacOSX, and it also works fine with just one draw
call if I switch to the TkAgg backend.

The following short script should demonstrate the issue (note: this is
only a problem when run as a script. It works fine on ipython, or
standard python prompt):

---
import time
from matplotlib import pyplot as plt

def graph():

        plt.ion()

        plt.plot(range(10), range(10,20))
        plt.draw()
        plt.draw()  # blank screen if this omitted
        time.sleep(2)
        plt.plot(range(30,40), range(10,20))
        plt.draw()
        plt.draw()  # second line not drawn if this omitted
        time.sleep(2)

        plt.ioff()

graph()
---

backend GTKAgg version 2.24.0
As a different but most likely related issue, th Qt4Agg backend doesn't
work even with two draw calls.

Is this a known issue? Is the script not using matplotlib as expected?
If so, is running a separate thread the intended way of showing graphs
in a non-blocking way?

Thanks,
alejandro

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to