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.

pbaspectSetting a value for the plot box aspect ratio or setting the plot box aspect ratiomode to manual disables <strong>MATLAB</strong>’s stretch-to-fill feature (stretching of theaxes to fit the window). This means setting the plot box aspect ratio to itscurrent value,pbaspect(pbaspect)can cause a change it the way the graphs look. See the Remarks section of theaxes reference description and the “Aspect Ratio” section in the Using<strong>MATLAB</strong> <strong>Graphics</strong> manual for a discussion of stretch-to-fill.Examples The following surface plot of the function z = xe( – x2 – y 2 ) is useful to illustratethe plot box aspect ratio. First plot the function over the range–2 ≤ x ≤ 2, –2 ≤ y ≤ 2,[x,y] = meshgrid([-2:.2:2]);z = x.*exp(-x.^2 - y.^2);surf(x,y,z)0.50−0.5210−1−2−2−1012Querying the plot box aspect ratio shows that the plot box is square.pbaspectans =1 1 12-342

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

Saved successfully!

Ooh no, something went wrong!