- oplot(x_in, y_in, linestyle=None, psym=None, symht=7)
- Interactively add an overlay x-y plot.
Overplots an x-y line plot onto a pre-existing plot on the active
VCS canvas. Syntax of method call, and symbol and linestyle codes,
are based on IDL conventions. However, defaults for input
parameters are set to my personal preferences, not IDL defaults.
Default overplot has square plot symbols connected by a solid line
(unless the system variables have settings different than their
* x_in: Vector of independent (x-axis) variable values. Numeric,
MA, or MV array.
* y_in: Vector of dependent (y-axis) variable values. Numeric,
MA, or MV array.
NB: If an input argument is MV, only the MA portion of the
variable is used; this procedure does not read the additional
attributes of the MV class.
* linestyle: Line style code for connecting lines. Default set
to IaGraph.Sysvar.__class__.p_linestyle. Integer. Key to
0: Solid line
3: Dash dot
5: Long dashes
Note: linestyle cannot equal 4; in IDL that corresponds to
dash-dot-dot, which is not a default defined linetype in VCS.
* psym: Symbol code. Default set to IaGraph.Sysvar.__class__.
p_psym. Integer. Negative values plot both symbol and line.
Key to values:
0: No symbol
1: Plus sign
3: Period, circle, or dot
If psym is less than 0, the symbol and connecting lines are
plotted. If psym is greater than 0, the symbol without connec-
ting lines are plotted. If psym is 0, lines without symbols
* symht: Plot symbol height. Integer scalar. Arbitrary units,
with range of 1 to 300. Default is 7 (which gives a square with
an on screen size of approximately 2 mm).
* Overplots x-y plot of data on screen on the active canvas.
* Unlike the plot command, oplot uses only VCS as its supported
Example to plot a plus sign for symbol, connecting solid lines,
and overplot the center part of the curve shifted by 90 deg (and
with 1/2 the amplitude), with square symbol and no connecting
from plot import plot
from oplot import oplot
x1 = Numeric.arange(50.)/Numeric.pi
x2 = Numeric.arange(15.,35.)/Numeric.pi
y1 = Numeric.sin(x1)
y2 = 0.5*Numeric.sin(x2-(Numeric.pi/2.))
plot(x1, y1, psym=-1)
oplot(x2, y2, psym=6)