PyDVT.ContourView (version 1.1.0, 08/11/2002)
index
/mntdirect/_bliss/users/gobbo/PyDVT/PyDVT/ContourView.py

ContourView.py
View derived class for contour and shading plots

 
Modules
            
Command
EventHandler
Numeric
PyDVT
sys
types

 
Classes
            
PyDVT.Filter.Filter
ContourFilter
Contour
PyDVT.View.View(PyDVT.GUIBinding.Binding.Container)
ContourView

 
class Contour(ContourFilter)
      View's simplified filter for direct NumPy interface.
(creates and hides it's own data object)
 
  
DataChanged(self, par) from PyDVT.Filter.Filter
DataCoord2SelectionCoord(self, data_coord) from PyDVT.Filter.Filter
Destroy(self, source=None)
If filter gets out of scope, this should be called to destroy
internally created data object.
GetData(self) from PyDVT.Filter.Filter
GetDataSelection(self) from PyDVT.Filter.Filter
GetInput(self) from PyDVT.Filter.Filter
GetOutput(self) from ContourFilter
GetSource(self) from PyDVT.Filter.Filter
Refresh(self) from PyDVT.Filter.Filter
SelectionCoord2DataCoord(self, selection_coord) from PyDVT.Filter.Filter
SetSynchronized(self, synchronized) from PyDVT.Filter.Filter
__init__(self, data=None, xdata=None, ydata=None, name=None)
Parameters:
    data: NumPy 2d array to be displayed
    xdata: Optional NumPy array defining x coordinates
    ydata: Optional NumPy array defining y coordinates

 
class ContourFilter(PyDVT.Filter.Filter)
      View's standard filter.
 
  
DataChanged(self, par) from PyDVT.Filter.Filter
DataCoord2SelectionCoord(self, data_coord) from PyDVT.Filter.Filter
Destroy(self, source=None) from PyDVT.Filter.Filter
GetData(self) from PyDVT.Filter.Filter
GetDataSelection(self) from PyDVT.Filter.Filter
GetInput(self) from PyDVT.Filter.Filter
GetOutput(self)
Returns the selection data (dictionary)
Keys:
    "name": string: name of function or None
    "data": NumPy array
    "xdata" 1d NumPy array
    "ydata" 1d NumPy array
GetSource(self) from PyDVT.Filter.Filter
Refresh(self) from PyDVT.Filter.Filter
SelectionCoord2DataCoord(self, selection_coord) from PyDVT.Filter.Filter
SetSynchronized(self, synchronized) from PyDVT.Filter.Filter
__init__(self, name=None, source=None, synchronized=1, buffer_input=0, xdata=None, ydata=None)
Parameters:
    name: Optional name of the function
    source: Source Filter/DataSelection
    synchronized: non-zero if on-line
    buffer_input: see Filter.__init__
    xdata: Optional NumPy array defining x coordinates
           (can be received by source  as well)
    ydata: Optional NumPy array defining y coordinates 
           (can be received by source  as well)

 
class ContourView(PyDVT.View.View)
      View derived class for contour/shading representation of 2d arrays.
This class accepts just one source object. If the SetData
is called with multiple sources, only the first one is considered
(this because the shading plot overrites existing plots. As DrawableContour
manages multiple functions, other class can be written to display multiple
contour plots.    
MeshView expects the following keys from it's source (GetOutput
method):
"data": 2d NumPy array to be drawn
"xdata":Optional.1d NumPy array with the x values. If None, take's [0 .. x dimention of "data"]
"ydata":Optional.1d NumPy array with the y values. If None, take's [0 .. y dimention of "data"]
"name": Optional. Not used for the moment.
 
Interface:
===========================
View interface
SetStyle
SetContourPen
ShowContourLabels
SetContourLevels
SetShadeLevels
SetShadeColormap
SetScaleLinear
SetScaleLog
SetLabels
ToggleGridlines
 
Overridables:    
===========================
View overridables
CreateMenu
 
  
AddMenuPopupCascade(self, label, menu) from PyDVT.View.View
AddMenuPopupItem(self, label, Command, Style='command') from PyDVT.View.View
AddMenuSeparator(self) from PyDVT.View.View
ClearMenu(self) from PyDVT.View.View
CreateDrawable(self)
Virtual: Implements creation of  a Drawable object (which implements the
Drawable interface)
CreateMenu(self)
Can be overwritten by derived classes to create a
different popup menu
DataChanged(self, source=None)
Virtual: See View.DataChanged
DataCoord2ImageCoord(self, data_coord) from PyDVT.View.View
DeleteMenuItem(self, index) from PyDVT.View.View
Destroy(self, source=None)
See View.Destroy
DisableMenuItem(self, index) from PyDVT.View.View
EnableMenuItem(self, index) from PyDVT.View.View
EventButtonPress(self, pos) from PyDVT.View.View
EventButtonPressMotion(self, pos) from PyDVT.View.View
EventButtonRelease(self, pos) from PyDVT.View.View
EventDoubleClick(self, pos) from PyDVT.View.View
EventKeyPress(self, key, flags) from PyDVT.View.View
EventMotion(self, pos) from PyDVT.View.View
GetDrawable(self) from PyDVT.View.View
GetDrawableHeight(self) from PyDVT.View.View
GetDrawableWidth(self) from PyDVT.View.View
GetHeight(self) from PyDVT.GUIBinding.Binding.Container
GetPopupMenu(self) from PyDVT.View.View
GetPosition(self, event) from PyDVT.View.View
GetSaveFormats(self)
Returns tuple with supported save formats
GetSource(self) from PyDVT.View.View
GetWidth(self) from PyDVT.GUIBinding.Binding.Container
ImageCoord2DataCoord(self, view_coord) from PyDVT.View.View
Invalidate(self) from PyDVT.View.View
IsVisible(self) from PyDVT.GUIBinding.Binding.Container
LockPosition(self, value) from PyDVT.View.View
Redraw(self)
Virtual: See View.Redraw
Refresh(self) from PyDVT.View.View
Save(self, filename, format) from PyDVT.View.View
SetContourLevels(self, levels)
Parameters:
  levels: number of contour levels
SetContourPen(self, pen)
Sets pen of the contour plot
Parameters:
  pen: Pen object
SetCursor(self, cursor) from PyDVT.View.View
SetLabels(self, title_label='', x_label='', y_label='')
Sets drawing labels
Parameters:
  title_label: Title of the drawing
  x_label: Label of x axis
  y_label: Label of y axis
SetOnLine(self, value) from PyDVT.View.View
SetPointer(self, pointer) from PyDVT.GUIBinding.Binding.Container
SetScaleLinear(self)
Sets linear scale for the drawing (default)
SetScaleLog(self)
Sets log scale for the drawing
SetShadeColormap(self, colormap)
Parameters:
  colormap: "GrayScale","Color","Temperature","Red","Green","Blue" or "RevGrey"
SetShadeLevels(self, levels)
Parameters:
  levels: number of shade levels
SetSize(self, width, height) from PyDVT.GUIBinding.Binding.Container
SetSource(self, source=()) from PyDVT.View.View
SetStyle(self, style='Contour')
Sets drawing style 
Parameters:
  style: "Contour", "Shade" or "ContourShade"
         Default: "Contour"
Show(self) from PyDVT.GUIBinding.Binding.Container
ShowContourLabels(self, show_labels)
Show/hides countour labels
Parameters:
  show_labels: shows if non-zero (default = 0)
ToggleGridlines(self)
Toggles gridlines on the plotting
Update(self) from PyDVT.View.View
_ButtonPress(self, event) from PyDVT.View.View
_ButtonPressMotion(self, event) from PyDVT.View.View
_ButtonRelease(self, event) from PyDVT.View.View
_ChangeGraphElementStyle(self, graphName, graphCnf)
_CmdLockPosition(self) from PyDVT.View.View
_CmdOnLine(self) from PyDVT.View.View
_CmdSetContourPen(self)
_DataChanged(self, source=None) from PyDVT.View.View
_DataDeleted(self, source=None) from PyDVT.View.View
_DoubleClick(self, event) from PyDVT.View.View
_KeyPress(self, key, flags=None) from PyDVT.View.View
_Motion(self, event) from PyDVT.View.View
_RightButtonPress(self, event) from PyDVT.View.View
_SetContourLabels(self)
__init__(self, parent=None, pars={}, **kw)
See View.__init__
Parameters:
  parent: Parent window
  pars:   Dictionary with View initialization options
          New options defined by this class (in addiction to base class options):
            No new option
  kw:     keywords to Container initializatregisterion

 
Author
             Alexandre Gobbo (gobbo@esrf.fr)