Path: news.mathworks.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!newsswitch.lcs.mit.edu!newsfeed.cwix.com!dc3peer2.nntp.savvis.net!peer.nntp.savvis.net!cycny02.gnilink.net!cyclone1.gnilink.net!gnilink.net!nx01.iad.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!d45g2000hsc.googlegroups.com!not-for-mail
From: Aaron Fude <aaronfude@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Add to a subplot
Date: Thu, 18 Sep 2008 16:32:25 -0700 (PDT)
Organization: http://groups.google.com
Lines: 43
Message-ID: <bf4db45e-1a07-4cfd-a7a2-761bb080180f@d45g2000hsc.googlegroups.com>
References: <710ce99f-25f3-4072-917a-969f8fcbad76@k13g2000hse.googlegroups.com> 
	<ujBAk.14864$Dj1.9847@newsfe01.iad>
NNTP-Posting-Host: 38.117.246.5
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1221780746 4269 127.0.0.1 (18 Sep 2008 23:32:26 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 18 Sep 2008 23:32:26 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: d45g2000hsc.googlegroups.com; posting-host=38.117.246.5; 
	posting-account=6cOJJQkAAABn9NmNIW9zAXQFfNgRk3xp
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GoogleT5; 
	.NET CLR 2.0.50727),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:490862


On Sep 18, 7:16=A0pm, Walter Roberson <rober...@hushmail.com> wrote:
> Aaron Fude wrote:
> > The subplot help states that invoking subplot(m, n, p) deletes the
> > contents and I have found myself unable to add to a subplot without
> > deleting the contents. How does one do it?
> >> help subplot
>
> =A0 =A0 If a SUBPLOT specification causes a new axis to overlap an
> =A0 =A0 existing axis, the existing axis is deleted - unless the position
> =A0 =A0 of the new and existing axis are identical. =A0For example,
> =A0 =A0 the statement SUBPLOT(1,2,1) deletes all existing axes overlappin=
g
> =A0 =A0 the left side of the Figure window and creates a new axis on that
> =A0 =A0 side - unless there is an axes there with a position that exactly
> =A0 =A0 matches the position of the new axes (and 'replace' was not speci=
fied),
> =A0 =A0 in which case all other overlapping axes will be deleted and the
> =A0 =A0 matching axes will become the current axes.
>
> > =A0(E.g. on a figure that was
> > obtained with the help of an open() command.)
> >> help subplot
>
> =A0 =A0 SUBPLOT('position',[left bottom width height]) creates an
> =A0 =A0 axis at the specified position in normalized coordinates (in
> =A0 =A0 in the range from 0.0 to 1.0).
>
> So if you have an existing axis that you want to match the position of,
> you can get() and record the Units of that existing axes, set() the Units=
 to
> 'normalized', get() and record the Position of the existing axes,
> set() the Units of the existing axes back to the recorded Units. The
> recorded position could then be passed to subplot(). On the other hand,
> doing that would just amount to doing the same thing as using axes() to
> make the existing axes the "current" axes.
>
> So... why not just findobj(TheFigureHandle, 'Type', 'axes') or something
> similar to find the -existing- axes, and make that existing axes the
> current axes ??

How do you get the existing axis from a particular subplot? Not sure
what to call get() on. And then how do you make the obtained axes the
current axes? I know how to get them but not how to set them.