6.4. Style Options

As seen in the previous sections, for multiple plots many plots on the same graphic window may result in confusion until, or unless, these are properly highlighted and labelled. Hence, for better illustration and outlook of plots different types of style options can be added. These are optional parameters that can be given in the plot command as follows:

plot (xvalues, yvalues, 'style options');

where xvalues and yvalues are vectors for x- and y-coordinates, whereas style-options is an optional argument, a string which can contain one to four characters enclosed in single quotation marks.

These are used to set the colour, the line style and the marker type for the curves to be drawn, such as:

-color(e.g. red, green, yellow, ...

Get MATLAB® and Its Applications in Engineering: [Based on MATLAB 7.5 (R2007b)] now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.