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.

linePurpose2lineCreate line objectSyntaxDescriptionline(X,Y)line(X,Y,Z)line(X,Y,Z,'PropertyName',PropertyValue,...)line('PropertyName',PropertyValue,...) low-level–PN/PV pairs onlyh = line(...)line creates a line object in the current axes. You can specify the color, width,line style, and marker type, as well as other characteristics.The line function has two forms:• Automatic color and line style cycling. When you specify matrix coordinatedata using the informal syntax (i.e., the first three arguments areinterpreted as the coordinates),line(X,Y,Z)<strong>MATLAB</strong> cycles through the axes ColorOrder and LineStyleOrder propertyvalues the way the plot function does. However, unlike plot, line does notcall the newplot function.• Purely low-level behavior. When you call line with only property name/property value pairs,line('XData',x,'YData',y,'ZData',z)<strong>MATLAB</strong> draws a line object in the current axes using the default line color(see the colordef function for information on color defaults). Note that youcannot specify matrix coordinate data with the low-level form of the linefunction.line(X,Y) adds the line defined in vectors X and Y to the current axes. If X andY are matrices of the same size, line draws one line per column.line(X,Y,Z) creates lines in three-dimensional coordinates.line(X,Y,Z,'PropertyName',PropertyValue,...) creates a line using thevalues for the property name/property value pairs specified and default valuesfor all other properties.See the LineStyle and Marker properties for a list of supported values.2-271

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

Saved successfully!

Ooh no, something went wrong!