Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

comet

2-D comet plot

Syntax

comet(y)
comet(x,y)
comet(x,y,p)
comet(ax,...)

Description

comet(y) displays a comet graph of the vector y. 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(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(ax,...) plots into the axes ax instead of into the current axes (gca).

Examples

collapse all

t = 0:.01:2*pi;
x = cos(2*t).*(cos(t).^2);
y = sin(2*t).*(sin(t).^2);
comet(x,y);

More About

collapse all

Tips

  • Comet graphs do not support data tips.

See Also

|

Introduced before R2006a

Was this topic helpful?