Package schrodinger :: Package analysis :: Module enrichment :: Class _BasePlotter
[hide private]
[frames] | no frames]

Class _BasePlotter

object --+
         |
        _BasePlotter
Known Subclasses:

Class on which Plotter and PercentScreenPlotter are based.

Instance Methods [hide private]
 
__init__(self, calcs, title, xlabel, ylabel, xmax, ymax)
Returns: None
list
getPointsFromCalc(self, calc)
Returns points for this metric from the given Calculator instance.
str
getLegendLabel(self, calc)
Return the string to show in the series legend.
 
plot(self, indexes=None)
Launch interactive matplotlib viewer loaded with the plot.
 
showPlotWindow(self, win_title)
Open a window with this plot.
 
savePlot(self, png_file='plot.png')
Serialized figure to a png format file.
 
getPlotFigure(self, indexes=None)
Returns a new pylab figure the plot.
 
addSeries(self, calc, style=None, plot_figure=None)
Returns: None
 
addReferenceSeries(self, style=None, plot_figure=None)
Returns: None.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, calcs, title, xlabel, ylabel, xmax, ymax)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • calcs (list) - List of Calculator instances.
  • title (string) - The plot title.
Returns:
None
Overrides: object.__init__

getPointsFromCalc(self, calc)

 

Returns points for this metric from the given Calculator instance.

Implement this method in subclasses.

Parameters:
  • calc (Calculator

    @return List of (x, y) points

    ) - Calculator instance.
Returns: list

getLegendLabel(self, calc)

 

Return the string to show in the series legend.

Parameters:
Returns: str
Label string

plot(self, indexes=None)

 

Launch interactive matplotlib viewer loaded with the plot.

Parameters:
  • indexes (list) - List of indexes into self.calcs to include in the plot. If the argument is None then all series are plotted.

showPlotWindow(self, win_title)

 

Open a window with this plot.

Parameters:
  • win_title (str) - Title for the plot window.

savePlot(self, png_file='plot.png')

 

Serialized figure to a png format file.

Parameters:
  • png_file (string) - Path to output png file.
Returns:
None

getPlotFigure(self, indexes=None)

 

Returns a new pylab figure the plot.

Parameters:
  • indexes (list) - List of indexes into self.calcs to include in the plot. If the argument is None then all series are plotted.
Returns:
Returns a pylab figure.

addSeries(self, calc, style=None, plot_figure=None)

 
Parameters:
  • calc (enrichment.Calculator) - An instance of this module's Calculator class.
  • style (string) - The matplotlib linestyle. If style is None then a style is selected by fetching the next element from self.styles.
  • plot_figure (pylab.Figure) - A pylab figure. If None then the current figure is used.
Returns:
None

addReferenceSeries(self, style=None, plot_figure=None)

 
Parameters:
  • style (string) - The matplotlib linestyle. If style is None then 'k-' is used.
  • plot_figure (pylab.Figure) - A pylab figure. If None then the current figure is used.
Returns:
None. Adds a diagonal representing random performance.