
Using Basic Plotting Functions
legend('sin(x)','sin(x-.25)','sin (x-.5)')
For More Information See “Defining the Color of Lines for Plotting” in the
MATLAB Graphics documentation.
Specifying Line Styles and Colors
It is possible to specify color, line styles, and markers (such as plus signs or
circles) when you plot your data using the
plot command:
plot(x,y,'color_style_marker')
color_style_marker
is a strin g con ta ining from one to four characters
(enclosed in single quotation marks) co ns tructed from a color, a line s tyle,
and a m arker type:
• Color strings are
'c', 'm ', 'y', 'r', 'g', 'b', 'w',and'k'.These
correspond to cyan, magenta, yellow, red, green, blue, white, and black.
3-51
Commentaires sur ces manuels