No BSD License  

Highlights from
contourz

5.0

5.0 | 3 ratings Rate this file 3 Downloads (last 30 days) File Size: 3.14 KB File ID: #3500

contourz

by Schuberth Schuberth

 

27 May 2003 (Updated 30 May 2003)

Make a contour plot in the xy-plane at a specific height.

| Watch this File

File Information
Description

CONTOURZ Contour plot.
    CONTOURZ(Z) is a contour plot of matrix Z treating the values in Z
    as heights above a plane. A contour plot are the level curves
    of Z for some values V. The values V are chosen automatically.
    CONTOURZ(X,Y,Z) X and Y specify the (x,y) coordinates of the
    surface as for SURF.
    CONTOURZ(Z,N) and CONTOURZ(X,Y,Z,N) draw N contour lines,
    overriding the automatic value.
    CONTOURZ(Z,V) and CONTOURZ(X,Y,Z,V) draw LENGTH(V) contour lines
    at the values specified in vector V. Use CONTOURZ(Z,[v v]) or
    CONTOURZ(X,Y,Z,[v v]) to compute a single contour at the level v.
    Use CONTOURZ(X,Y,Z,[v v],height) to draw at the z value 'height'.
    [C,H] = CONTOURZ(...) returns contour matrix C as described in
    CONTOURC and a column vector H of handles to LINE or PATCH
    objects, one handle per line. Both of these can be used as
    input to CLABEL. The UserData property of each object contains the
    height value for each contour.
 
    The contours are normally colored based on the current colormap
    and are drawn as PATCH objects. You can override this behavior
    with the syntax CONTOURZ(...,'LINESPEC') to draw the contours as
    LINE objects with the color and linetype specified.
 
    Uses code by R. Pawlowicz to handle parametric surfaces and
    inline contour labels.
 
    Example:
        [x,y]=meshgrid(-4:0.2:4,-4:0.2:4);
        z=sin(sqrt(x.^2+y.^2)).^2;
        surfl(x,y,z);
        hold on;
        contourz(x,y,z,'',-2);
        contourz(x,y,z,[0.01 0.05 0.1 0.13],3);
        hold off;
       
 
    See also CONTOUR, CONTOUR3, CONTOURF, CLABEL, COLORBAR.

MATLAB release MATLAB 6.1 (R12.1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
02 Jul 2003 Benjamin Woodacre

I can't run the demo code. Matlab 6.5 (R13) complains that there are not enough input arguments.

14 Oct 2004 anon anon

R14SP1 is not complaining. Work great !

19 Oct 2005 Arvind Kumar

Sweet. Does exactly what it says. I spent 2-3 hours trying different options in MATLAB and gave up. And this works.

Anon Anon: Try the example given in the file. It works

27 Jun 2009 Pablo Tarazaga

THIS WAS great I spent so much time trying to figure out how to do this. I used it to plot a mesh and then a defined contour plot with however many isolines i want! great job.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
specialized Schuberth Schuberth 22 Oct 2008 07:02:02
plotting Schuberth Schuberth 22 Oct 2008 07:02:02
contour height contourz Schuberth Schuberth 22 Oct 2008 07:02:02
contours Schuberth Schuberth 22 Oct 2008 07:02:02
plot Schuberth Schuberth 22 Oct 2008 07:02:02
x Schuberth Schuberth 22 Oct 2008 07:02:02
y Schuberth Schuberth 22 Oct 2008 07:02:02
graphics Schuberth Schuberth 22 Oct 2008 07:02:02

Contact us at files@mathworks.com