Path: news.mathworks.com!newsfeed-00.mathworks.com!NNTP.WPI.EDU!elk.ncren.net!newsflash.concordia.ca!canopus.cc.umanitoba.ca!not-for-mail
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Newsgroups: comp.soft-sys.matlab
Subject: Re: grouping plot handles?
Date: Wed, 9 Apr 2008 16:01:28 +0000 (UTC)
Organization: National Research Council Canada - Conseil national de rechereches Canada
Lines: 26
Message-ID: <ftip8o$kq8$1@canopus.cc.umanitoba.ca>
References: <ftiik2$7ni$1@fred.mathworks.com>
NNTP-Posting-Host: origin.ibd.nrc.ca
X-Trace: canopus.cc.umanitoba.ca 1207756888 21320 192.70.172.160 (9 Apr 2008 16:01:28 GMT)
X-Complaints-To: abuse@cc.umanitoba.ca
NNTP-Posting-Date: Wed, 9 Apr 2008 16:01:28 +0000 (UTC)
Originator: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Xref: news.mathworks.com comp.soft-sys.matlab:462012



In article <ftiik2$7ni$1@fred.mathworks.com>,
David Doria <daviddoria@gmail.com> wrote:
>I would like to do this
>%group 1
>a=plot(0,1,'o');
>b=plot(1,1,'ro');

As you did not specify axes to plot(), both of them are going to
use the current axis (gca). Unless 'hold on' is in effect, that is
going to result in the second plot, 'b', replacing the first one, and
the handles in 'a' would become invalid.

>%group 2
>c=plot(1,2,'go');

Similarily, unless 'hold on', that would delete the plot 'b'.

>delete(group 1)

>how would I do that?

Unless your code is a bit different than what you show here, you
would not need to.
-- 
  "They called it golf because all the other four letter words
  were taken."                                    -- Walter Hagen