Graphics    

Setting Default Line Styles

You can configure MATLAB to use line styles instead of colors for multi-line 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" in the "Handle Graphics Objects" chapter for more information.


  Line Styles for Black and White Output Line Plots of Matrix Data