Module pygplot
[show private | hide private]
[frames | no frames]

Module pygplot

Pygplot: A Python Interface to Pgplot

Version: 0.91

Author: Chris Burns

Requires:

Pgplot (http://www.astro.caltech.edu/~tjp/pgplot/)

You can get the source for pygplot here: http://astro.swarthmore.edu/~burns/pygplot_downloads.

There is the beginnings of a manual here: http://astro.swarthmore.edu/~burns/pygplot.pdf.

This python module provides an object-oriented interface to the Pgplot library of routines. Most (though not all) of the functionality of Pgplot is included:
  1. 1-D plots using lines, symbols and error-bars
  2. 2-D plots using color (or gray-scale) images and contours
  3. Access to all the pgplot primitives through the ppgplot extension module.

Classes
MPlot Class used to create a multi-panel plot with separate bounding boxes.
Panel Class used to create a multi-panel plot with a single bounding box.
Plot Class to make a single 2-D plot.

Function Summary
  columns(filename)
Read in the specified file and try to extract columns.
  Linear(low, high, n)
Convenience function for computing n numbers linearly interpolated between low and high.
  list_devices()
Print out the list of available devices.
  list_palettes()
Print the currently installed palettes to the terminal.
  pgspline(xp, yp, x, slope0, slope1)
Compute the cubic spline for a set of data

Variable Summary
dict descriptions = {'/NULL': ['(Null device, no output)', 0]...
list devices = ['/GIF', '/VGIF', '/NULL', '/PPM', '/VPPM', '/...
int n_devices = 15                                                                    

Function Details

columns(filename)

Read in the specified file and try to extract columns. So far, it will recognise space-, comma-, tab-, or semi-colon-delimited columns.
Parameters:
filename - the name of the file to read
           (type=string)
Returns:
a 2-D array: one row for each column in the file

Linear(low, high, n)

Convenience function for computing n numbers linearly interpolated between low and high. Used as the default function for the cfunc parameter to the contour function.

list_devices()

Print out the list of available devices.

list_palettes()

Print the currently installed palettes to the terminal.

pgspline(xp, yp, x, slope0=None, slope1=None)

Compute the cubic spline for a set of data
Parameters:
xp - An array of x-coordinates for the control points.
           (type=float array)
yp - An array of y-coordinates for the control points.
           (type=float array)
x - An array of x-coordinates where you want interpolations to be done
           (type=float array)
slope0 - Optionally specify the slope at the beginning of the interval
           (type=float)
slope1 - Optionally specify the slope at the end of the interval
           (type=float)

Variable Details

descriptions

Type:
dict
Value:
{'/CPS': ['(Colour PostScript file, landscape orientation)', 0],
 '/GIF': ['(Graphics Interchange Format file, landscape orientation)',\
 0],
 '/NULL': ['(Null device, no output)', 0],
 '/PPM': ['(Portable Pixel Map file, landscape orientation)', 0],
 '/PS': ['(PostScript file, landscape orientation)', 0],
 '/VCPS': ['(Colour PostScript file, portrait orientation)', 0],
 '/VGIF': ['(Graphics Interchange Format file, portrait orientation)',\
...                                                                    

devices

Type:
list
Value:
['/GIF', '/VGIF', '/NULL', '/PPM', '/VPPM', '/PS', '/VPS', '/CPS', '/V\
CPS']                                                                  

n_devices

Type:
int
Value:
15                                                                    

Generated by Epydoc 2.1 on Thu Feb 17 15:17:27 2005 http://epydoc.sf.net