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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

plotPurpose2plotLinear 2–D plotSyntaxDescriptionplot(Y)plot(X1,Y1,...)plot(X1,Y1,LineSpec,...)plot(...,'PropertyName',PropertyValue,...)h = plot(...)plot(Y) plots the columns of Y versus their index if Y is a real number. If Y iscomplex, plot(Y) is equivalent to plot(real(Y),imag(Y)). In all other uses ofplot, the imaginary component is ignored.plot(X1,Y1,...) plots all lines defined by Xn versus Yn pairs. If only Xn or Ynis a matrix, the vector is plotted versus the rows or columns of the matrix,depending on whether the vector’s row or column dimension matches thematrix.plot(X1,Y1,LineSpec,...) plots all lines defined by the Xn,Yn,LineSpectriples, where LineSpec is a line specification that determines line type,marker symbol, and color of the plotted lines. You can mix Xn,Yn,LineSpectriples with Xn,Yn pairs: plot(X1,Y1,X2,Y2,LineSpec,X3,Y3).plot(...,'PropertyName',PropertyValue,...) sets properties to thespecified property values for all line graphics objects created by plot. (See the“Examples” section for examples.)h = plot(...) returns a column vector of handles to line graphics objects, onehandle per line.RemarksIf you do not specify a color when plotting more than one line, plotautomatically cycles through the colors in the order specified by the currentaxes ColorOrder property. After cycling through all the colors defined byColorOrder, plot then cycles through the line styles defined in the axesLineStyleOrder property.Note that, by default, <strong>MATLAB</strong> resets the ColorOrder and LineStyleOrderproperties each time you call plot. If you want changes you make to these2-353

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

Saved successfully!

Ooh no, something went wrong!