23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

contourslice<br />

Examples This example uses the flow data set to illustrate the use of contoured slice<br />

planes (type help flow for more information on this data set). Notice that this<br />

example:<br />

2-322<br />

• Specifies a vector of length = 9 for Sx, an empty vector for the Sy, and a<br />

scalar value (0) for Sz. This creates nine contour plots along the x direction<br />

in the y-z plane, and one in the x-y plane at z = 0.<br />

• Uses linspace to define a ten-element linearly spaced vector of values from<br />

-8 to 2 that specifies the number of contour lines to draw at each interval.<br />

• Defines the view and projection type (camva, camproj, campos)<br />

• Sets figure (gcf) and axes (gca) characteristics.<br />

[x y z v] = flow;<br />

h = contourslice(x,y,z,v,[1:9],[],[0],linspace(-8,2,10));<br />

axis([0,10,-3,3,-3,3]); daspect([1,1,1])<br />

camva(24); camproj perspective;<br />

campos([-3,-15,5])<br />

set(gcf,'Color',[.5,.5,.5],'Renderer','zbuffer')<br />

set(gca,'Color','black','XColor','white', ...<br />

'YColor','white','ZColor','white')<br />

box on

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

Saved successfully!

Ooh no, something went wrong!