This section describes functions from file plotmtv.ct.
[] = annotate(primitive...)
annotate("primitive"[,options]) adds MTV annotations to the previous
graph. The plot command(s) and the annotate command(s) must appear
inside hold(on) ... hold(off) in order to work correctly.
See also:
plotopt
,
hold
,
plot
,
pcolor
,
mesh
,
contour
,
vplot
.
Error codes:
1: Could not open temporary MTV file
2: First argument not a string
3: Syntax error in graph options
[] = contour(z...)
contour(z[,options]) plots the matrix z as a filled contour plot.
See also:
contour3
,
annotate
,
plot
,
mesh
,
pcolor
,
vplot
.
Error codes:
1: Could not open temporary MTV file
2: First argument is not a numeric 2D array
3: Syntax error in graph options
4: Write error in MTV file - file system full?
[] = contour3(z...)
contour3(z[,options]) plots the 3D array as a
"volume" plot. Currently this only means that all
six faces of the volume are contoured and colored
according to options.
See also:
annotate
,
plot
,
mesh
,
pcolor
,
vplot
.
contour.
Error codes:
1: Could not open temporary MTV file
2: First argument is not a real 3D array
3: Syntax error in graph options
4: Write error in MTV file - file system full?
[X,Y] = grid(x,y)
[X,Y] = grid(x,y) produces matrices X,Y that are formed from vectors x,y
such that X[i,j] = x[i] for all j, and Y[i,j] = y[j] for all j.
Error codes:
-1: Input argument is array but not a vector
-2: Input argument is not real array
[] = hold(flag)
hold(on) and hold(off) set the graphics hold mode on and off.
When hold is on, all graphics commands will be accumulated and
performed only until hold(off).
If hold(on) is called many times in succession, also hold(off)
must be called as many times until the plots are produced.
For example, if
function f() {hold(on); plot1(); plot2(); hold(off)};
and it is called as
hold(on); f(); plot3(); hold(off);
then all three plots are actually combined in one plot.
See also:
plot
.
Error codes:
1: Argument not an integer
[] = mesh(z...)
mesh(z[,options]) plots the matrix z as a 3D mesh.
See also:
annotate
,
plot
,
contour
,
pcolor
,
vplot
.
Error codes:
1: Could not open temporary MTV file
2: First argument is not a numeric 2D array
3: Syntax error in graph options
4: Write error in MTV file - file system full?
[] = pcolor(z...)
pcolor(z[,options]) plots the matrix z as a pseudocolor density plot.
See also:
annotate
,
plot
,
contour
,
mesh
,
vplot
.
Error codes:
1: Could not open temporary MTV file
2: First argument is not a numeric 2D array
3: Syntax error in graph options
4: Write error in MTV file - file system full?
[] = plot(...)
plot(x1,y1,[options1], x2,y2,[options2],...) is the basic 2D plot function.
Each vector yi is plotted versus the corresponding xi. All curves yi are
displayed in the same figure. The option sequences must consist of keyword-
value pairs. Example:
x = 0:0.1:4*pi;
plot(x,sin(x), "linewidth",3,"linecolor",2);
The abscissa x may be missing, in which case the default of 1:length(y)
is used. The ordinates y may be matrices; then each row produces one
curve. If also abscissa x is matrix, the x-value may be different for each
curve.
See also:
plot3
,
annotate
,
plotopt
,
mesh
,
contour
,
pcolor
,
vplot
.
Error codes:
1: Could not open temporary MTV file
2: Nonnumeric or complex data argument
3: Syntax error in graph options
4: The abscissa ("x") must be a vector or a matrix
5: The ordinate ("y") must be a vector or a matrix
6: x and y dimensions disagree
[] = plot3(x,y,z...)
plot3(x,y,z[,options]) produces parametric space curves.
The quantities x,y,z must have equal ranks, and they can
be either vectors or matrices. If they are vectors, only
one space curve is drawn. If they are matrices, the number
of curves produces equals the number of rows.
See also:
plot
,
annotate
.
Error codes:
1: Could not open temporary MTV file
2: y dimensionality disagrees with x dimensionality
3: z dimensionality disagrees with x dimensionality
4: Input arrays must be integer or real arrays
5: Input arrays must have rank equal to 1 or 2
6: Syntax error in graph options
[] = plotopt(s)
plotopt("-3d -colorps -landscape...") sets a set of PlotMTV command
line options for subsequent graphics commands.
See also:
plot
,
annotate
.
Error codes:
1: Argument not a string
[] = vplot(x,y,vx,vy...)
vplot(x,y,vx,vy[,options]) produces a 2D vector plot of the vector
field (vx,vy). All arguments x,y,vx and vy must be 2D integer or
real arrays and of the same size. Each 2D vector will be positioned
at (x[i,j],y[i,j]) and its direction will be (vx[i,j],vy[i,j]) where
(i,j) run over rows and columns of the matrices.
See also:
annotate
,
plot
,
mesh
,
contour
,
pcolor
.
Error codes:
1: Could not open temporary MTV file
2: One of first four args is not a numeric array
3: One of first four args has rank not equal to 2
4: Dimensions of first four args disagree
5: Syntax error in graph options
Next Chapter, Previous Chapter
Table of contents of this chapter, General table of contents
Top of the document, Beginning of this Chapter