UniDec
Universal Deconvolution of Mass and Ion Mobility Spectra
Public Member Functions | Public Attributes | List of all members
UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan Class Reference

Public Member Functions

def __init__
 
def new_axes (self, axes)
 
def update_background (self, event)
 
def ignore (self, event)
 
def press (self, event)
 
def release (self, event)
 
def update (self)
 
def onmove (self, event)
 

Public Attributes

 axes
 
 canvas
 
 visible
 
 cids
 
 rect
 
 background
 
 pressv
 
 rectprops
 
 onselect
 
 onmove_callback
 
 useblit
 
 minspan
 
 buttonDown
 
 prev
 
 data_lims
 

Detailed Description

Expansion of matplotlib embed in wx example by John Bender and Edward
Abraham, see http://www.scipy.org/Matplotlib_figure_in_a_wx_panel

This version allows the user to zoom in on the figure using either
a span selector or a box selector. You can also set a persistent span
selector that acts as cursor references on top of whatever is plotted

ZoomSpan based on matplotlib.widgets.SpanSelector
CursorSpan based on matplotlib.widgets.SpanSelector
BoxZoom based on matplotlib.widgets.RectangleSelector

Brian J. Soher, Duke University, 20 October, 2010


Select a min/max range of the x or y axes for a matplotlib Axes

Example usage:

  axes = subplot(111)
  axes.plot(x,y)

  def onselect(vmin, vmax):
      print vmin, vmax
  span = ZoomSpan(axes, onselect, 'horizontal')

  onmove_callback is an optional callback that will be called on mouse move
  with the span range

Constructor & Destructor Documentation

def UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.__init__ (   self,
  axes,
  onselect,
  minspan = None,
  useblit = False,
  rectprops = None,
  onmove_callback = None 
)
Create a span selector in axes.  When a selection is made, clear
the span and call onselect with

  onselect(vmin, vmax)

If minspan is not None, ignore events smaller than minspan

The span rect is drawn with rectprops; default
  rectprops = dict(facecolor='red', alpha=0.5)

set the visible attribute to False if you want to turn off
the functionality of the span selector

Member Function Documentation

def UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.ignore (   self,
  event 
)

Here is the caller graph for this function:

def UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.new_axes (   self,
  axes 
)

Here is the call graph for this function:

def UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.onmove (   self,
  event 
)

Here is the call graph for this function:

Here is the caller graph for this function:

def UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.press (   self,
  event 
)

Here is the call graph for this function:

Here is the caller graph for this function:

def UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.release (   self,
  event 
)

Here is the call graph for this function:

Here is the caller graph for this function:

def UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.update (   self)

Here is the caller graph for this function:

def UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.update_background (   self,
  event 
)

Here is the caller graph for this function:

Member Data Documentation

UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.axes
UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.background
UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.buttonDown
UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.canvas
UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.cids
UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.data_lims
UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.minspan
UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.onmove_callback
UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.onselect
UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.pressv
UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.prev
UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.rect
UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.rectprops
UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.useblit
UniDec.unidec_modules.isolated_packages.ZoomSpan.ZoomSpan.visible

The documentation for this class was generated from the following file: