Class to make a single 2-D plot. Use this class to produce a single
frame plot, with axes, lines, points, etc. See constructor for
options.
Example:
Method Summary |
|
__init__ (self,
**kw)
Initialization routine. |
|
__getattr__(self,
name)
|
|
__setattr__(self,
name,
value)
|
|
axis (self,
x1,
y1,
x2,
y2,
v1,
v2,
log,
label,
dec,
exp,
step,
nsub,
dmajl,
dmajr,
fmin,
disp,
orient,
fsize,
font,
linestyle,
linewidth,
color)
Add an alternate axis to the plot. |
|
close (self)
Close the plot device. |
|
color_point (self,
x,
y,
z,
symbol,
size,
palette,
transfer)
Add a data set that will be drawn with symbols. |
|
contour (self,
data,
**kw)
Contour plot data. |
|
error (self,
x,
y,
dx1,
dy1,
dx2,
dy2,
linestyle,
linewidth,
color)
Add error bars to the data points. |
|
histogram (self,
data,
**kw)
Plot a histogram of unbinned data. |
|
image (self,
data,
**kw)
Plot a grey-scale or color image representation of data on the
background of the plot. |
|
label (self,
x,
y,
string,
angle,
just,
fsize,
font,
color,
width,
vjust,
bbox)
Add a label to the plot. |
|
legend (self,
height,
width,
position,
dx,
dy,
bbox,
fsize,
font,
color)
Draw a legend for the data. |
|
line (self,
x,
y,
linestyle,
linewidth,
color,
label)
Add a data set that are connected with lines |
|
plot (self,
just)
Plot the plot object. |
|
point (self,
x,
y,
symbol,
size,
color,
label)
Add a data set that will be drawn with symbols. |
|
replot (self)
Select the plot's device, erase and redraw the plot. |
|
select (self)
This will make the instance's device the selected device (and make
it's panel the current pane if it is part of an Mplot or Panel). |
|
_draw_box (self,
rangex,
rangey,
just)
Simply draws the exterior box, axes, and ticks. |
|
_plot_labels (self,
rangex,
rangey,
just)
Plot the title, xlabels and ylabels. |
|
_set_viewport (self,
just)
This sets the viewport accordint to the justivication parameter
(just). |
|
_set_window (self,
rangex,
rangey,
just,
other)
This internal routine sets up the viewport and window for the plot or
sub-panel. |
|
_update_limits(self)
|
axis(self,
x1,
y1,
x2,
y2,
v1,
v2,
log=0,
label=0,
dec=0,
exp=0,
step=0,
nsub=0,
dmajl=0.5,
dmajr=0.5,
fmin=0.5,
disp=0.29999999999999999,
orient=0.0,
fsize=None,
font=None,
linestyle=None,
linewidth=None,
color=None)
Add an alternate axis to the plot. This does not alter the viewport
nor change the way points are plotted; it is merely a convenient way to
add another axis.
-
- Parameters:
x1 -
x world coordinate of the beginning of the axis
(type=float)
y1 -
y world coordinate of the beginning of the axis
(type=float)
x2 -
x world coordinate of the end of the axis
(type=float)
y2 -
y world coordinate of the end of the axis
(type=float)
v1 -
value of the axis at (x1,y1)
(type=float)
v2 -
x value of the axis at (x2,y2)
(type=float)
step -
major tick spacing along the axis.
(type=float)
nsub -
number of minor ticks per major tick interval
(type=int)
dmajl -
length of the major tick to the left of the axis in units of
character height
(type=float)
dmajr -
length of the major tick to the right of the axis in units of
character height
(type=float)
fmin -
length of the minor ticks as fraction of the major tick.
(type=float)
disp -
displacement of numeric labels away from the axis. In units of
character height.
(type=float)
orient -
angle at which to print labels, relative to the axis. (default
0.0)
(type=float)
fsize -
font size to use (defaults to the Plot's global value)
(type=float)
font -
font with which to print the label (defaults to the Plot's
global value)
(type=int)
linestyle -
line style to use (defaults to the Plot's global value)
(type=int)
linewidth -
line width to use (defaults to the Plot's global value)
(type=int)
color -
Color with which to print the label (defaults to the Plot's
global value)
(type=string/int)
|