comet3(z) displays a comet plot of the data
specified in z versus x- and
y-values matching the indices of z. A
comet is an animation of a marker (head) and a line (tail) tracing
a growing line over the data points. The tail is a solid line that traces the entire
function.
comet3(x,y,z)
displays a comet plot of z versus x and
y.
comet3(x,y,z,p)
specifies the comet body length. The comet body is a trailing segment in a different color
that follows the head before fading. The body length is p*length(y),
where p is a scalar in [0, 1).
Create a comet plot of the data in z versus the data in x and y. Use the peaks function to load x, y, and z data in matrix forms. Convert the data into vector arrays. Then, plot the data.
Create a comet plot and specify the comet body length by setting the scale factor input p. The comet body is a trailing segment in a different color that follows the head before fading.
Use the peaks function to load x, y, and z data in matrix forms. Convert the data into vector arrays. Specify p as 0.5 so that the body length is 0.5*length(y). Then, plot the data.
Create two comet plots in a tiled chart layout by specifying the target axes for each plot.
Use the peaks function to load x, y, and z data in matrix forms. Convert the data into vector arrays. Specify the body length scale factor p as 0.25 so that the body length is 0.5*length(y).
Store the two Axes objects as ax1 and ax2. Specify the target axes for each comet plot by including the Axes object as the first input argument to comet.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.