Graphics Previous page   Next Page

Setting Default Line Styles

You can configure MATLAB to use line styles instead of colors for multiline plots by setting a default value for the axes LineStyle property. For example, the command

defines three line styles and makes them the default for all plots.

To set the default line color to dark gray, use the statement

See ColorSpec for information on how to specify color as a three-element vector of RGB values.

Now the plot command uses the line styles and colors you have defined as defaults. For example, these statements create a multiline plot.

The default values persist until you quit MATLAB. To remove default values during your MATLAB session, use the reserved word remove.

See Setting Default Property Values for more information.


Previous page  Line Styles for Black and White Output Line Plots of Matrix Data Next page

© 1994-2005 The MathWorks, Inc.