From: Kelly <kakearney@gmail.com>
Path: news.mathworks.com!newsfeed-00.mathworks.com!webcrossing
Newsgroups: comp.soft-sys.matlab
Subject: Re: specify parent map axes?
Message-ID: <ef5bc6a.2@webcrossing.raydaftYaTP>
Date: Tue, 26 Jun 2007 17:11:01 -0400
References: <ef5bc6a.-1@webcrossing.raydaftYaTP> <ef5bc6a.0@webcrossing.raydaftYaTP> <ef5bc6a.1@webcrossing.raydaftYaTP>
Lines: 35
NNTP-Posting-Host: 128.112.176.104
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Xref: news.mathworks.com comp.soft-sys.matlab:415886



matt dash wrote:

> here is a sample of my code, which is part of a pretty large gui
> (unfortunately the sample is also long... but it's pretty
> straightforward.) I think the reason your code works is that the
> correct subplot is already the target (it becomes the target when
> you
> create it), so the 'parent' in linem is redundant (why this
> matters,
> I dont know, but it looks like it does):
>
> thanks for your help!

Actually, the reason mine works is that I made both subplots map
axes. So even though I had switched the focus to a different plot, I
avoided the error meassage you found. But the bug was still
manifesting itself by plotting the wrong projection.

This does seem to be a bug in linem. If you look at line 129 of the
linem code,

[mstruct,msg] = gcm;

you'll see it does grabs the mstruct data before it begins plotting.
But instead of checking the axis you specified using the 'parent'
property, it completely ignores this command and checks whatever the
current axis is, and throws an error if this axis doesn't hold a map
axis.

I'd go ahead and report this bug to The Mathorks. To get it working
properly, you'll probably have to modify linem to parse the inputs
and look for a parent axis to feed to gcm in this line rather than
always defaulting to the current one.

-Kelly