Label plot lines like a contour plot

Label plot lines like a contour plot

Post by Dale » Tue, 03 Mar 2009 06:20:18


I am generating level curves of a function through a numerical approach that generates all the points on the level curves. I want to be able to label the lines analogously to how they are label when using Matlab's builtin contour commands. Is this possible?

The reason I don't use the builtin contour command to generate my level curves is that there are *** regions where there is no solution, so I can't just mesh up a box and show the contours of everything in that box.

Thanks,
~Dale
 
 
 

Label plot lines like a contour plot

Post by Bruno Luon » Tue, 03 Mar 2009 06:39:01


help clabel

Bruno

 
 
 

Label plot lines like a contour plot

Post by Dale » Tue, 03 Mar 2009 06:57:01

Doesn't clabel require C as an input argument, where C is the output of a contour command? If so, I don't have this. I have (x,y) pairs that define the level curves. For example, I have a 100x2 matrix, each row being a point along the curve. I plot the level curve using the plot command, i.e., plot(x(:,1),x(:,2)). Plot returns a handle, but not a C matrix.

Am I missing something?

Thanks,
~Dale
 
 
 

Label plot lines like a contour plot

Post by Bruno Luon » Sun, 08 Mar 2009 22:49:01


No. I'm probably the one who is missing. clabel won't work for you. Sorry about that.

Bruno