Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Clickable subplots
Date: Mon, 20 Aug 2007 17:51:23 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 34
Message-ID: <fackar$51d$1@fred.mathworks.com>
References: <faaglg$4k6$1@fred.mathworks.com> <facc2p$8ve$1@fred.mathworks.com> <facgjt$6kf$1@fred.mathworks.com> <facio3$c3i$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1187632283 5165 172.30.248.37 (20 Aug 2007 17:51:23 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 20 Aug 2007 17:51:23 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1030060
Xref: news.mathworks.com comp.soft-sys.matlab:424658



Hi Steve,
Thanks for the very useful information. My responses are below.

"Steven Lord" <slord@mathworks.com> wrote in message     ''
>
http://www.mathworks.com/support/solutions/data/1-1B5UM.html?solution=1-1B5UM
> 

Now I do understand that issue. That's a good link. Thanks.

> 
> > The other strange thing is that some of my subplots respond
> > to mouse clicks and some do not. I set ButtonDownFcn on all
> > of them the same - I do it in a loop. Some subplots seem to
> > lose the callback and some don't. That's really strange. Any
> > ideas what I should look for?
> 
> Do you plot into some of your subplots and not others?

I plot into all of them the same. However, it looks as if
the issue is related to exactly where I click with the
mouse. If I happen to click on a line series (i.e., the plot
object itself), the callback fcn is not called. However, if
I click on other areas (the background, the axes, etc.), the
callback is called. So it looks to me like the callback
associated with the subplot (the axes) does not get called
if the mouse click happens to land on the plot itself.

What is the solution? Attach the same callback to the plot
and the subplot? I'm guessing there is a more elegant way...

Thanks for your tips.