Package rdkit :: 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
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
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
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
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
source code
Variables [hide private]
  __package__ = 'rdkit.ML.Cluster'

Imports: pid, piddle, ClusterUtils, numpy


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