Good job!


On Fri, Jan 29, 2010 at 4:14 AM, Fernando Perez <> wrote:
On Thu, Jan 28, 2010 at 8:01 PM, Christopher Barker
<> wrote:
> Might I suggest that that be made:
> leg.draggable(True)
> leg.draggable(False)

Agreed.  My favorite api for toggles is:

_state = True

def toggle(state=None):
   global _state
   old = _state
   if state is None:
       _state = not _state
       _state = state
   return old


This lets you:

- toggle without arguments
- set state specifically as needed
- save previous state before setting it if you need to make temporary changes.



The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
Matplotlib-users mailing list