Asked by chia hua
on 26 May 2013

Hi I want to have a contour plot without zero value line,

I have been search internet and matlab Q&A for a long time,

but can't find answer , how can I do this ?

P.S. I know contour plot can give the line interval you want to avoid zero line,but I have several figures and each one has different scale, so is there any method to omit zero line after you draw the figure ?

thank you

this is my figure link

https://docs.google.com/file/d/0BxUY6-ywKIvpUjF5VlIwZFU0VkU/edit?usp=sharing

Answer by Walter Roberson
on 26 May 2013

Accepted answer

Yes, it is possible to remove the 0 contour after drawing... and what if there is no contour at exactly 0 because your "int" steps ended up with the closest division being at (say) -1/10? Or -5000 depending on the scale of the data.

You are better of figuring out exactly where you want the contours, and providing that list of levels as the argument after "projn" in your call. That way you could figure out how big you want your steps to be, and you could round() the levels to "nice numbers" using what-ever algorithm you liked, and you could decide whether you just want the 0 deleted (leaving a double-width near 0) or if you want to instead center the equal-sized steps so that 0 is in the middle between two steps.

Opportunities for recent engineering grads.

## 2 Comments

## Artur M. G. Lourenço (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/76986#comment_150996

your image is a raster (pictorios) or vector?

## chia hua (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/76986#comment_151007

this is my code , I think it is vector..?

xx,yy : grid

projn : data