Package pylal :: Module plotutils :: Class ImagePlot
[hide private]
[frames] | no frames]

Class ImagePlot

source code

object --+    
         |    
 BasicPlot --+
             |
            ImagePlot

The equivalent of pylab.imshow(), but with the BasicPlot niceties and some defaults that are more in tune with what a scientist wants -- origin="lower", requiring x and y bins so that we can label axes correctly, and a colorbar.

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
Basic plot initialization.
source code
 
add_content(self, image, x_bins, y_bins, **kwargs)
Add a given image to this plot.
source code
 
finalize(self, colorbar=True, logcolor=False, minorticks=False, clim=None)
Stub.
source code

Inherited from BasicPlot: add_legend_if_labels_exist, close, savefig

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, *args, **kwargs)
(Constructor)

source code 

Basic plot initialization. A subclass can override __init__ and call this one (plotutils.BasicPlot.__init__(self, *args, **kwargs)) and then initialize variables to hold data to plot and labels.

Overrides: object.__init__
(inherited documentation)

add_content(self, image, x_bins, y_bins, **kwargs)

source code 

Add a given image to this plot.

Parameters:
  • image - two-dimensional numpy array to plot
  • x_bins - pylal.rate.Bins instance describing the x binning
  • y_bins - pylal.rate.Bins instance describing the y binning
Overrides: BasicPlot.add_content

finalize(self, colorbar=True, logcolor=False, minorticks=False, clim=None)

source code 

Stub. Replace with a function that creates and makes your plot pretty. Do not do I/O here.

Decorators:
  • @method_callable_once
Overrides: BasicPlot.finalize
(inherited documentation)