comets
[Return to Matlab File Index]
Function Synopsis
comets(x,y,p,color,linesty,linewid)
Help text
COMETS Multiple comet plot.
COMET(Y) displays an animated comet plot of the vector Y.
COMET(X,Y) displays an animated comet plot of vector Y vs. X.
COMET(X,Y,P) uses a comet of length p*length(Y).
Default is p = 0.10.
COMETS(X,Y,P,COLOR,LINESTY,LINEWID)
Other arguments that can be specified are:
COLOR = [CH1 CB1 CT1; CH2 CB2 CT2; ... ; CHN CBN CTN], where
CH - color of the head, CB - body, CT - tail. The full
format is Nx3 string matrix if colors are letters (among
'rgbycmwk') or Nx9 number matrix if colors are RGB triplets.
LINESTYLE = [LSH1 LSB1 LST1; ... ; LSHN LSBN LSTN],
where LSH1 of the size [1 2] is the linestyle of the head,
etc. The full size is Nx6 string matrix, each linestyle
represented by [1 2] size string: 'o ', '- ', '--', etc.
For example LINESTYLE = ['x --- '; '* - -'] represents two
comets: the first one with the head 'x', the body '--' and
the tail '-', the second with the head '*', the body '-' and
the tail '-'.
LINEWIDTH = [LWH1 LWB1 LWT1; ... LWHN LWBN LWTN], where LWH1
(positive integer) is the linewidth (or markersize) of the
head, etc. The full size is Nx3 matrix.
If all line property arguments (COLOR, LINESTYLE, LINEWIDTH)
have only 1 row, then COMETS works in fast "vectorized" regime
and all comets have the same colors and linestyles (only 3 line
objects will be created). If any of these arguments have more
than 1 row the total number of comets will be equal to the
number of columns of matrices X and Y, each comet represented
by 3 separate line objects (their movement is slower in this
case). If the number of rows in the line property arguments is
less than the number of columns in X, Y then colors and
linestyles will be cycled through.
COMETS is the front-end to COMETS0, which can be called by
itself but with stricter syntax.
COMETS, by itself, is self demonstrating.
Example:
t = -pi:pi/200:pi;
comets(t,tan(sin(t))-sin(tan(t)))
See also COMETS0, CMTSDEMO, COMET, COMET3.
Cross-Reference Information
This function calls
This function is called by