Package gmt :: Module gmt :: Class PanelPlot
[show private | hide private]
[frames | no frames]

Class PanelPlot


create multi-panel plots of same-sized figures using the PyX module.
Method Summary
  __init__(self, nrows, ncols, marginx, marginy)
Initialize a PanelPlot instance.
  close(self, rotate, paperformat, psfilename, view)
save the PanelPlot postscript to a file, optionally render the plot.
  insert(self, plot, scale, rotate)
insert plot in PanelPlot.

Instance Variable Summary
  psview: "gs -q -dBATCH" | command for viewing postscript output (invoked when view=True in call to close method).

Method Details

__init__(self, nrows, ncols, marginx=0.25, marginy=0.25)
(Constructor)

Initialize a PanelPlot instance.
Parameters:
nrows - the number of rows in the panel plot.
ncols - the number of columns in the panel plot. A PanelPlot instance with nrows=1,ncols=1 is useful for centering a plot on the page and scaling it to fit the format specified in the close method.
Keyword Parameters:
marginx - 0.25 | the space between plots in each row (inches).
marginy - 0.25 | the space between plots in each column (inches).

close(self, rotate=False, paperformat='letter', psfilename='gmt.eps', view=False)

save the PanelPlot postscript to a file, optionally render the plot.
Keyword Parameters:
psfilename - "gmt.eps" | Save postscript to file with this name.
rotate - False | rotate the plot 90 degrees (landscape format).
paperformat - "letter" | paperformat for postscript output (e.g. "letter" or "a4"). The plot will be scaled to fit the specified paperformat.
view - False | render postscript using command specified by psview instance variable.

insert(self, plot, scale=1.0, rotate=False)

insert plot in PanelPlot.

Columns are filled first, then rows, starting in the upper left corner.
Parameters:
plot - can either be a StringIO instance or a postscript file.
Keyword Parameters:
scale - 1.0 | scale factor to resize the plot. This is typically used to enlarge the last panel to occupy the remaining columns (for example, if nrows=2,ncols=2 and there are only three panels, the last panel can be doubled in size to fill both columns).
rotate - False | rotate the plot the specified angle (in degrees).

Instance Variable Details

psview

"gs -q -dBATCH" | command for viewing postscript output (invoked when view=True in call to close method).

Generated by Epydoc 2.1 on Sun Nov 14 07:18:16 2004 http://epydoc.sf.net