|
From: Mark B. <ma...@gm...> - 2006-07-09 13:44:45
|
John was asking whether there was something left to be fixed befor 0.88. In 0.87.3, there is still a bug left that has been reported several times I think. In interactive mode on TkAgg, after solving by clicking on the 'save' button in toolbar2, mpl loses its knowledge of the figure. Any plotting statement given after that creates a new figure, rather than add to the existing one. I wish I knew how to fix this. I am (still, but not much longer) running Python 2.3, but I think Fernando reported the bug in Python 2.4 as well. Thanks, Mark |
|
From: Fernando P. <fpe...@gm...> - 2006-07-09 17:32:16
|
On 7/9/06, Mark Bakker <ma...@gm...> wrote: > John was asking whether there was something left to be fixed befor 0.88. > In 0.87.3, there is still a bug left that has been reported several times I > think. > > In interactive mode on TkAgg, after solving by clicking on the 'save' button > in toolbar2, > mpl loses its knowledge of the figure. Any plotting statement given after > that > creates a new figure, rather than add to the existing one. I wish I knew how > to fix this. > I am (still, but not much longer) running Python 2.3, but I think Fernando > reported > the bug in Python 2.4 as well. Confirmed: bug is still there, with current SVN mpl under python2.4. Cheers, f |
|
From: John H. <jdh...@ac...> - 2006-07-09 19:47:22
|
>>>>> "Mark" == Mark Bakker <ma...@gm...> writes:
Mark> John was asking whether there was something left to be fixed
Mark> befor 0.88. In 0.87.3, there is still a bug left that has
Mark> been reported several times I think.
Interesting. the tk ask file dialog seems to be triggering a destgroy
event on the main window, which removes it from mpl figure
management. Here is a minimal Tk script which exposes the problem.
When you press the mouse button, you get a file dialog that when you
close it triggers a destroy event and calls the callback function
I don't know if this is a tk bug or if we are misusing the Tk code.
Tk experts?
I'll post on python-list.
JDH
import Tkinter as Tk
from tkFileDialog import asksaveasfilename
def button(event):
fname = asksaveasfilename(
title='Save the figure'
)
window = Tk.Tk()
frame = Tk.Frame(window, width=500,height=500)
frame.bind('<Button-1>', button)
frame.pack()
def callback(*args):
print 'called callback'
window.bind("<Destroy>", callback)
window.mainloop()
|
|
From: Mark B. <ma...@gm...> - 2006-07-09 20:00:47
|
The weird thing is that this used to work fine in the past.
At least, I am pretty sure it did.
Then again, I am watching the Worlcup final at this time.
So a significant part of my brain is doing something else,
Mark
On 7/9/06, John Hunter <jdh...@ac...> wrote:
>
> >>>>> "Mark" == Mark Bakker <ma...@gm...> writes:
>
> Mark> John was asking whether there was something left to be fixed
> Mark> befor 0.88. In 0.87.3, there is still a bug left that has
> Mark> been reported several times I think.
>
> Interesting. the tk ask file dialog seems to be triggering a destgroy
> event on the main window, which removes it from mpl figure
> management. Here is a minimal Tk script which exposes the problem.
> When you press the mouse button, you get a file dialog that when you
> close it triggers a destroy event and calls the callback function
>
> I don't know if this is a tk bug or if we are misusing the Tk code.
> Tk experts?
>
>
> I'll post on python-list.
>
> JDH
>
> import Tkinter as Tk
> from tkFileDialog import asksaveasfilename
>
> def button(event):
> fname = asksaveasfilename(
> title='Save the figure'
> )
>
>
>
>
> window = Tk.Tk()
> frame = Tk.Frame(window, width=500,height=500)
> frame.bind('<Button-1>', button)
> frame.pack()
>
>
> def callback(*args):
> print 'called callback'
> window.bind("<Destroy>", callback)
>
> window.mainloop()
>
>
>
|
|
From: John H. <jdh...@ac...> - 2006-07-09 20:04:52
|
>>>>> "Mark" == Mark Bakker <ma...@gm...> writes:
Mark> The weird thing is that this used to work fine in the past.
Mark> At least, I am pretty sure it did. Then again, I am
Mark> watching the Worlcup final at this time. So a significant
Mark> part of my brain is doing something else, Mark
At some point, we upgraded our tk filesave dialog to use the more
modern one. We could always revert to the old one, which would
likely fix this but let's give it a day and see if we can't have the
best of both worlds. Hopefully, the effbot will pick up on my c.l.py
post...
JDH
|
|
From: Mark B. <ma...@gm...> - 2006-07-17 12:01:52
|
John, Others - I tried the old style saveas dialogue and it works fine. But the dialogue is so ugly that I am very hesitant to suggest to switch to the old saveas. I looked on the web and didn't see any reply to John's post on the python list. John - you want te repost? I think Clovis submitted the patch with the new, good looking saveas dialogue. Do you have any idea Clovis? Also, I have a Tkinter GUI I wrote that has mpl plots in it, and when I use saveas from the menubar in that application I don't get this problem. Very strange.... Mark On 7/9/06, John Hunter <jdh...@ac...> wrote: > > >>>>> "Mark" == Mark Bakker <ma...@gm...> writes: > > Mark> The weird thing is that this used to work fine in the past. > Mark> At least, I am pretty sure it did. Then again, I am > Mark> watching the Worlcup final at this time. So a significant > Mark> part of my brain is doing something else, Mark > > At some point, we upgraded our tk filesave dialog to use the more > modern one. We could always revert to the old one, which would > likely fix this but let's give it a day and see if we can't have the > best of both worlds. Hopefully, the effbot will pick up on my c.l.py > post... > > JDH > |