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.

xlim, ylim, zlimExamplesThis example illustrates how to set the x- and y-axis limits to match the actualrange of the data, rather than the rounded values of [-2 3] for the x-axis and[-2 4] for the y-axis originally selected by <strong>MATLAB</strong>.[x,y] = meshgrid([−1.75:.2:3.25]);z = x.*exp(−x.^2−y.^2);surf(x,y,z)xlim([−1.75 3.25])ylim([−1.75 3.25])0.50−0.53210−1−10123See AlsoaxisThe axes properties XLim, YLim, ZLimThe “Aspect Ratio” section in the online Using <strong>MATLAB</strong> <strong>Graphics</strong> manual.2-591

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

Saved successfully!

Ooh no, something went wrong!