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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

contoursliceExamplesThis example uses the flow data set to illustrate the use of contoured sliceplanes (type help flow for more information on this data set). Notice that thisexample:• Specifies a vector of length = 9 for Sx, an empty vector for the Sy, and ascalar value (0) for Sz. This creates nine contour plots along the x directionin the y-z plane, and one in the x-y plane at z = 0.• Uses linspace to define a ten-element linearly spaced vector of values from-8 to 2 that specifies the number of contour lines to draw at each interval.• Defines the view and projection type (camva, camproj, campos)• Sets figure (gcf) and axes (gca) characteristics.[x y z v] = flow;h = contourslice(x,y,z,v,[1:9],[],[0],linspace(-8,2,10));axis([0,10,-3,3,-3,3]); daspect([1,1,1])camva(24); camproj perspective;campos([-3,-15,5])set(gcf,'Color',[.5,.5,.5],'Renderer','zbuffer')set(gca,'Color','black','XColor','white', ...'YColor','white','ZColor','white')box on2-111

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

Saved successfully!

Ooh no, something went wrong!