12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Axes Propertiessets LineStyleOrder to solid line with asterisk marker, dotted line, and hollowcircle marker. The default is (−), which specifies a solid line for all data plotted.Alternatively, you can create a cell array of character strings to define the linestyles:set(gca,'LineStyleOrder',{'−*',':','o'})<strong>MATLAB</strong> supports four line styles, which you can specify any number of timesin any order. <strong>MATLAB</strong> cycles through the line styles only after using all colorsdefined by the ColorOrder property. For example, the first eight lines plotteduse the different colors defined by ColorOrder with the first line style.<strong>MATLAB</strong> then cycles through the colors again, using the second line stylespecified, and so on.You can also specify line style and color directly with the plot and plot3functions or by altering the properties of the line objects.Note that, if the axes NextPlot property is set to replace (the default),high-level functions like plot reset the LineStyleOrder property beforedetermining the line style to use. If you want <strong>MATLAB</strong> to use aLineStyleOrder that is different from the default, set NextPlot toreplacedata. You can also specify your own default LineStyleOrder.LineWidthlinewidth in pointsWidth of axis lines. This property specifies the width, in points, of the x-, y-, andz-axis lines. The default line width is 0.5 points (1 point = 1 / 72 inch).NextPlotadd | {replace} | replacechildrenWhere to draw the next plot. This property determines how high-level plottingfunctions draw into an existing axes.• add — use the existing axes to draw graphics objects.• replace — reset all axes properties, except Position, to their defaults anddelete all axes children before displaying graphics (equivalent to cla reset).• replacechildren — remove all child objects, but do not reset axes properties(equivalent to cla).The newplot function simplifies the use of the NextPlot property and is usedby M-file functions that draw graphs using only low-level object creationroutines. See the M-file pcolor.m for an example. Note that figure graphicsobjects also have a NextPlot property.2-27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!