| MATLAB Function Reference | ![]() |
![]()
To graph selected variables, use the Plot Selector
in the Workspace Browser,
or use the Figure Palette Plot Catalog. Manipulate graphs in plot edit mode with the Property Editor. For details,
see Plotting Tools
— Interactive Plotting in the MATLAB® Graphics
documentation and Creating Graphics
from the Workspace Browser in the MATLAB Desktop Tools
and Development Environment documentation.
comet(y)
comet(x,y)
comet(x,y,p)
comet(axes_handle,...)
A comet graph is an animated graph in which a circle (the comet head) traces the data points on the screen. The comet body is a trailing segment that follows the head. The tail is a solid line that traces the entire function.
comet(y) displays a comet graph of the vector y.
comet(x,y) displays a comet graph of vector y versus vector x.
comet(x,y,p) specifies a comet body of length p*length(y). p defaults to 0.1.
comet(axes_handle,...) plots into the axes with the handle axes_handle instead of into the current axes (gca).
The trace left by comet is created by using an EraseMode of none, which means you cannot print the graph (you get only the comet head), and it disappears if you cause a redraw (e.g., by resizing the window).
Create a simple comet graph:
t = 0:.01:2*pi; x = cos(2*t).*(cos(t).^2); y = sin(2*t).*(sin(t).^2); comet(x,y);
Direction and Velocity Plots for related functions
![]() | colperm | comet3 | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |