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.

plotproduce this graph.3210−1−2−3−4 −3 −2 −1 0 1 2 3 4Specifying Tick Mark Location and LabelingYou can adjust the axis tick-mark locations and the labels appearing at eachtick. For example, this plot of the sine function relabels the x-axis with moremeaningful values,x = −pi:.1:pi;y = sin(x);plot(x,y)set(gca,'XTick',−pi:pi/2:pi)set(gca,'XTickLabel',{'−pi','−pi/2','0','pi/2','pi'})2-355

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

Saved successfully!

Ooh no, something went wrong!