Package ML :: Package Cluster :: Module ClusterVis
[hide private]
[frames] | no frames]

Module ClusterVis

source code

Cluster tree visualization using Sping



Classes [hide private]
  VisOpts
stores visualization options for cluster viewing...
  ClusterRenderer
Functions [hide private]
 
_scaleMetric(val, power=2, min=0.0001) source code
 
DrawClusterTree(cluster, canvas, size, ptColors=[], lineWidth=None, showIndices=0, showNodes=1, stopAtCentroids=0, logScale=0, tooClose=-1)
handles the work of drawing a cluster tree on a Sping canvas **Arguments** - cluster: the cluster tree to be drawn - canvas: the Sping canvas on which to draw - size: the size of _canvas_ - ptColors: if this is specified, the _colors_ will be used to color the terminal nodes of the cluster tree.
source code
 
_DrawClusterTree(cluster, canvas, size, ptColors=[], lineWidth=None, showIndices=0, showNodes=1, stopAtCentroids=0, logScale=0, tooClose=-1)
handles the work of drawing a cluster tree on a Sping canvas **Arguments** - cluster: the cluster tree to be drawn - canvas: the Sping canvas on which to draw - size: the size of _canvas_ - ptColors: if this is specified, the _colors_ will be used to color the terminal nodes of the cluster tree.
source code
 
ClusterToPDF(cluster, fileName, size=(300, 300), ptColors=[], lineWidth=None, showIndices=0, stopAtCentroids=0, logScale=0)
handles the work of drawing a cluster tree to an PDF file **Arguments** - cluster: the cluster tree to be drawn - fileName: the name of the file to be created - size: the size of output canvas - ptColors: if this is specified, the _colors_ will be used to color the terminal nodes of the cluster tree.
source code
 
ClusterToSVG(cluster, fileName, size=(300, 300), ptColors=[], lineWidth=None, showIndices=0, stopAtCentroids=0, logScale=0)
handles the work of drawing a cluster tree to an SVG file **Arguments** - cluster: the cluster tree to be drawn - fileName: the name of the file to be created - size: the size of output canvas - ptColors: if this is specified, the _colors_ will be used to color the terminal nodes of the cluster tree.
source code
 
ClusterToImg(cluster, fileName, size=(300, 300), ptColors=[], lineWidth=None, showIndices=0, stopAtCentroids=0, logScale=0)
handles the work of drawing a cluster tree to an image file **Arguments** - cluster: the cluster tree to be drawn - fileName: the name of the file to be created - size: the size of output canvas - ptColors: if this is specified, the _colors_ will be used to color the terminal nodes of the cluster tree.
source code
Variables [hide private]
  Complex0 = 'F'
  Complex16 = 'F'
  Complex32 = 'F'
  Complex64 = 'D'
  Complex8 = 'F'
  Float0 = 'f'
  Float16 = 'f'
  Float32 = 'f'
  Float64 = 'd'
  Float8 = 'f'
  Int0 = '1'
  Int16 = 's'
  Int32 = 'i'
  Int8 = '1'
  absolute = <ufunc 'absolute'>
  add = <ufunc 'add'>
  arccos = <ufunc 'arccos'>
  arccosh = <ufunc 'arccosh'>
  arcsin = <ufunc 'arcsin'>
  arcsinh = <ufunc 'arcsinh'>
  arctan = <ufunc 'arctan'>
  arctan2 = <ufunc 'arctan2'>
  arctanh = <ufunc 'arctanh'>
  bitwise_and = <ufunc 'bitwise_and'>
  bitwise_or = <ufunc 'bitwise_or'>
  bitwise_xor = <ufunc 'bitwise_xor'>
  ceil = <ufunc 'ceil'>
  conjugate = <ufunc 'conjugate'>
  cos = <ufunc 'cos'>
  cosh = <ufunc 'cosh'>
  divide = <ufunc 'divide'>
  divide_safe = <ufunc 'divide_safe'>
  e = 2.71828182846
  equal = <ufunc 'equal'>
  exp = <ufunc 'exp'>
  fabs = <ufunc 'fabs'>
  floor = <ufunc 'floor'>
  floor_divide = <ufunc 'floor_divide'>
  fmod = <ufunc 'fmod'>
  greater = <ufunc 'greater'>
  greater_equal = <ufunc 'greater_equal'>
  hypot = <ufunc 'hypot'>
  invert = <ufunc 'invert'>
  left_shift = <ufunc 'left_shift'>
  less = <ufunc 'less'>
  less_equal = <ufunc 'less_equal'>
  log = <ufunc 'log'>
  log10 = <ufunc 'log10'>
  logical_and = <ufunc 'logical_and'>
  logical_not = <ufunc 'logical_not'>
  logical_or = <ufunc 'logical_or'>
  logical_xor = <ufunc 'logical_xor'>
  maximum = <ufunc 'maximum'>
  minimum = <ufunc 'minimum'>
  multiply = <ufunc 'multiply'>
  negative = <ufunc 'negative'>
  not_equal = <ufunc 'not_equal'>
  pi = 3.14159265359
  power = <ufunc 'power'>
  remainder = <ufunc 'remainder'>
  right_shift = <ufunc 'right_shift'>
  sin = <ufunc 'sin'>
  sinh = <ufunc 'sinh'>
  sqrt = <ufunc 'sqrt'>
  subtract = <ufunc 'subtract'>
  tan = <ufunc 'tan'>
  tanh = <ufunc 'tanh'>
  true_divide = <ufunc 'true_divide'>
Function Details [hide private]

DrawClusterTree(cluster, canvas, size, ptColors=[], lineWidth=None, showIndices=0, showNodes=1, stopAtCentroids=0, logScale=0, tooClose=-1)

source code 
handles the work of drawing a cluster tree on a Sping canvas

 **Arguments**

   - cluster: the cluster tree to be drawn

   - canvas:  the Sping canvas on which to draw

   - size: the size of _canvas_

   - ptColors: if this is specified, the _colors_ will be used to color
     the terminal nodes of the cluster tree.  (color == _pid.Color_)

   - lineWidth: if specified, it will be used for the widths of the lines
     used to draw the tree

**Notes**

  - _Canvas_ is neither _save_d nor _flush_ed at the end of this

  - if _ptColors_ is the wrong length for the number of possible terminal
    node types, this will throw an IndexError

  - terminal node types are determined using their _GetData()_ methods
    

_DrawClusterTree(cluster, canvas, size, ptColors=[], lineWidth=None, showIndices=0, showNodes=1, stopAtCentroids=0, logScale=0, tooClose=-1)

source code 
handles the work of drawing a cluster tree on a Sping canvas

 **Arguments**

   - cluster: the cluster tree to be drawn

   - canvas:  the Sping canvas on which to draw

   - size: the size of _canvas_

   - ptColors: if this is specified, the _colors_ will be used to color
     the terminal nodes of the cluster tree.  (color == _pid.Color_)

   - lineWidth: if specified, it will be used for the widths of the lines
     used to draw the tree

**Notes**

  - _Canvas_ is neither _save_d nor _flush_ed at the end of this

  - if _ptColors_ is the wrong length for the number of possible terminal
    node types, this will throw an IndexError

  - terminal node types are determined using their _GetData()_ methods
    

ClusterToPDF(cluster, fileName, size=(300, 300), ptColors=[], lineWidth=None, showIndices=0, stopAtCentroids=0, logScale=0)

source code 
handles the work of drawing a cluster tree to an PDF file

 **Arguments**

   - cluster: the cluster tree to be drawn

   - fileName: the name of the file to be created

   - size: the size of output canvas

   - ptColors: if this is specified, the _colors_ will be used to color
     the terminal nodes of the cluster tree.  (color == _pid.Color_)

   - lineWidth: if specified, it will be used for the widths of the lines
     used to draw the tree

**Notes**

  - if _ptColors_ is the wrong length for the number of possible terminal
    node types, this will throw an IndexError

  - terminal node types are determined using their _GetData()_ methods
    

ClusterToSVG(cluster, fileName, size=(300, 300), ptColors=[], lineWidth=None, showIndices=0, stopAtCentroids=0, logScale=0)

source code 
handles the work of drawing a cluster tree to an SVG file

 **Arguments**

   - cluster: the cluster tree to be drawn

   - fileName: the name of the file to be created

   - size: the size of output canvas

   - ptColors: if this is specified, the _colors_ will be used to color
     the terminal nodes of the cluster tree.  (color == _pid.Color_)

   - lineWidth: if specified, it will be used for the widths of the lines
     used to draw the tree

**Notes**

  - if _ptColors_ is the wrong length for the number of possible terminal
    node types, this will throw an IndexError

  - terminal node types are determined using their _GetData()_ methods
    

ClusterToImg(cluster, fileName, size=(300, 300), ptColors=[], lineWidth=None, showIndices=0, stopAtCentroids=0, logScale=0)

source code 
handles the work of drawing a cluster tree to an image file

 **Arguments**

   - cluster: the cluster tree to be drawn

   - fileName: the name of the file to be created

   - size: the size of output canvas

   - ptColors: if this is specified, the _colors_ will be used to color
     the terminal nodes of the cluster tree.  (color == _pid.Color_)

   - lineWidth: if specified, it will be used for the widths of the lines
     used to draw the tree

**Notes**

  - The extension on  _fileName_ determines the type of image file created.
    All formats supported by PIL can be used.
    
  - if _ptColors_ is the wrong length for the number of possible terminal
    node types, this will throw an IndexError

  - terminal node types are determined using their _GetData()_ methods