I'm not sure I understood correctly, but maybe the attached example from the
docsting of the RectangleSelector helps you.
A kind of a choice-box is 'RadioButtons', whose usage is explained in the
On Thursday 13 August 2009 04:05:09 Eli Brosh wrote:
> I am trying to use the RectangleSelector widget.
> In the corresponding example
> the rectangle selector is activated every time I click inside the axes.
> However, I would like to activate it on demand.
> For example, suppose there is a choice-box (using a simple gui like
> One of the possible choices would be "select rectangle".
> I would like the RectangleSelector to be activated only after the "select
> rectangle" option is chosen and deactivated after one rectangle selection.
> It should be activated again only after the choice-menu is presented again
> and the "selected rectangle" option is chosen again.
> The MATLAB equivalent to what I need is the command rbbox
>lpdesk/help/techdoc/ref/rbbox.html It can be activated on demand, in a norma
> "linear" program and not just in event-driven GUI.
> Is there a way to get the same functionality from matplotlib ?