How to delete or remove contours from surfc ?
Show older comments
Hello, I'm having difficulties removing the contours from surfc plot. The point is the plot was already created so i cannot change the plot type. I have 100 figures so i want to write a short code that deletes the contours. Thanks,
Answers (1)
Walter Roberson
on 23 Apr 2013
Edited: Walter Roberson
on 23 Apr 2013
delete() the objects of type 'patch'.
For example,
delete( findobj(gca, 'Type', 'patch') )
If you happen to have the output returned from the surfc() command, you do not need to do the findobj:
h = surfc( rand(20,20) );
then later if you have "h" still available,
delete(h(2:end))
Categories
Find more on Contour Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!