|
From: Matthias M. <Mat...@gm...> - 2007-05-07 13:41:20
Attachments:
RS_activate.patch
|
Hello list, refering to the thread 'activate/deactivate RectangleSelector' of the developer-mailing-list I thought a bit about the problem because I found it quite irritating that the RS couldn't be stopped during zooming. I attached a patch including Martin's example and my proposal to (de)activate RectangleSelector including deactivation during zoom mode. I hope this is helpful for others too and can be part of matplotlib. best regards, Matthias PS: Should I send those mails to developer mailing list? |
|
From: Matthias M. <Mat...@gm...> - 2007-06-26 13:15:53
|
Hello everybody, first of all: Sorry for posting to my own thread. But I really like this new feature and may be the last message got lost among the lots of mpl-mails. So I ask you once more for comments on this issue (please). Is this new feature a bug to some of the RectangleSelector-users or a real feature? Could it be part of mpl? Thanks in advance for any comments. Matthias Michler On Thursday 03 May 2007 18:22, Matthias Michler wrote: > Hello list, > > refering to the thread 'activate/deactivate RectangleSelector' of the > developer-mailing-list I thought a bit about the problem because I found it > quite irritating that the RS couldn't be stopped during zooming. > > I attached a patch including Martin's example and my proposal to > (de)activate RectangleSelector including deactivation during zoom mode. > > I hope this is helpful for others too and can be part of matplotlib. > > best regards, > Matthias > > PS: Should I send those mails to developer mailing list? |
|
From: John H. <jd...@gm...> - 2007-06-26 14:35:23
|
On 6/26/07, Matthias Michler <Mat...@gm...> wrote: > Hello everybody, > > first of all: Sorry for posting to my own thread. > But I really like this new feature and may be the last message got lost among > the lots of mpl-mails. So I ask you once more for comments on this issue > (please). > > Is this new feature a bug to some of the RectangleSelector-users or a real > feature? > Could it be part of mpl? Thanks for reminding us on this one. Making these widgets work well together can be a pain. I wrote some locking functionality to help coordinate them, is any of this functionality useful to you? The patch looks mostly correct, but the code trying to get the toolbar state is problematic + # If zoom mode was activated + if not (Gcf.get_active().toolbar.mode == ''): + return True + Gcf is a pylab construct, and code in widgets must not be dependent on pylab. Also, using the mode string here looks a bit hackish since it is designed to communicate to the user rather than represent state. See if you can use the lock functionality to achieve the same purpose -- eg look at how widgetlock is used in the toolbar in backend_bases. If this is not viable, let me know why and we'll figure a better way for these widgets to communicate. JDH |
|
From: Matthias M. <Mat...@gm...> - 2007-06-26 18:31:37
Attachments:
RS_activate_2.patch
|
Hello John, thank you for your reply. I'm not sure I really understood the widgetlock, but I think the following lines seem to do what I want - (Am I right?): + # If canvas was locked + if not self.canvas.widgetlock.available(self): + return True I attached once more my patch including these new lines. best regards, Matthias On Tuesday 26 June 2007 16:35, John Hunter wrote: > On 6/26/07, Matthias Michler <Mat...@gm...> wrote: > > Hello everybody, > > > > first of all: Sorry for posting to my own thread. > > But I really like this new feature and may be the last message got lost > > among the lots of mpl-mails. So I ask you once more for comments on this > > issue (please). > > > > Is this new feature a bug to some of the RectangleSelector-users or a > > real feature? > > Could it be part of mpl? > > Thanks for reminding us on this one. Making these widgets work well > together can be a pain. I wrote some locking functionality to help > coordinate them, is any of this functionality useful to you? > > The patch looks mostly correct, but the code trying to get the toolbar > state is problematic > > + # If zoom mode was activated > + if not (Gcf.get_active().toolbar.mode == ''): > + return True > + > > Gcf is a pylab construct, and code in widgets must not be dependent on > pylab. Also, using the mode string here looks a bit hackish since it > is designed to communicate to the user rather than represent state. > See if you can use the lock functionality to achieve the same purpose > -- eg look at how widgetlock is used in the toolbar in backend_bases. > If this is not viable, let me know why and we'll figure a better way > for these widgets to communicate. > > JDH |
|
From: Matthias M. <Mat...@gm...> - 2007-09-20 09:17:28
|
Hello developers, I'm sorry for reposting again. I really would like to have this feature in mpl. Please let me know if there is anything I can do to change my proposal to make it match with matplotlib. thanks in advance and best regards, Matthias |
|
From: John H. <jd...@gm...> - 2007-09-20 14:14:37
|
On 9/20/07, Matthias Michler <Mat...@gm...> wrote: > Hello developers, > > I'm sorry for reposting again. I really would like to have this feature in > mpl. > Please let me know if there is anything I can do to change my proposal to make > it match with matplotlib. Committed to svn revision 3867 -- thanks for the patch and reminder. JDH |