How to delete or remove contours from surfc ?

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)

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

Asked:

Gev
on 23 Apr 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!