Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TkAgg backend: draw_if_interactive() broken? #1627

Closed
msiegl opened this issue Dec 30, 2012 · 6 comments
Closed

TkAgg backend: draw_if_interactive() broken? #1627

msiegl opened this issue Dec 30, 2012 · 6 comments

Comments

@msiegl
Copy link

msiegl commented Dec 30, 2012

The TkAgg backend does not draw_if_interactive() as expected.

It seems that in backend_tkagg.py, the function should use (in line 65)

figManager.canvas.draw()

instead of
figManager.show()

Can anyone confirm that?

@WeatherGod
Copy link
Member

Yeah, I am fairly certain that show() should be doing calling canvas.draw() (actually, it might be draw_idle()). Along a similar line, cocoaagg and fltkagg might have similar bugs.

@efiring
Copy link
Member

efiring commented Jan 8, 2013

On 2013/01/08 11:43 AM, Benjamin Root wrote:

Yeah, I am fairly certain that show() should be doing calling
canvas.draw() (actually, it might be draw_idle()). Along a similar line,
cocoaagg and fltkagg might have similar bugs.

What is the simplest way to reproduce the bug?

@msiegl
Copy link
Author

msiegl commented Jan 9, 2013

I run

import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt

plt.ion()
plt.plot([1,1])

Expected result: window opens, shows plot
Actual result: window opens, plot is not shown. Another call to plt.draw() is required, then it shows.

@efiring
Copy link
Member

efiring commented Jan 10, 2013

On 2013/01/08 11:47 PM, msiegl wrote:

I run

import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt

plt.ion()
plt.plot([1,1])

Expected result: window opens, shows plot
Actual result: window opens, plot is not shown. Another call to
plt.draw() is required, then it shows.

What version and platform are you using? I can't reproduce this with
1.2.x on either a Mac or under Linux--I get the expected result in both
cases.

@msiegl
Copy link
Author

msiegl commented Jan 10, 2013

Thank you for checking this.

My problem is under cygwin (should have mentioned earlier). Apparently draw_idle(), when called by show(), doesn't get to draw. So it has to be 'forced' with draw() instead. Any ideas why my GUI would not be idle in above example?

Since the original issue is void, feel free to close this thread.

@tacaswell
Copy link
Member

Closing as OP said it was fixed a year ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants