clearing a subplot

classic Classic list List threaded Threaded
2 messages Options
Maso Ricci Maso Ricci
Reply | Threaded
Open this post in threaded view
|

clearing a subplot

Hi all,

does anybody know how to clear a subplot ?
I mean something like: clf(subplot(2,1,2))

thanks

/maso


--

Maso Ricci Ph.D
Dept. of Chemical and Biosystem Science
University of Siena
Via A. Moro, 2 ­ 53100 Siena
ITALY
Tel: +39 0577 234367
Fax: +39 0577 234177
email: [hidden email]

Enrico Segre Enrico Segre
Reply | Threaded
Open this post in threaded view
|

Re: clearing a subplot

you need to find what the handle to its axes is (one way is to save its
handle with gca() right after having plotted it, another to get it among
the children of gcf(), but the order of the children changes, the most
recent one being always the first), then you can delete() it.
hth, Enrico