Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Clickable subplots
Date: Mon, 20 Aug 2007 14:05:11 -0400
Organization: The MathWorks, Inc.
Lines: 28
Message-ID: <facl4n$h1r$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> <fackar$51d$1@fred.mathworks.com>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1187633111 17467 144.212.105.187 (20 Aug 2007 18:05:11 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 20 Aug 2007 18:05:11 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
Xref: news.mathworks.com comp.soft-sys.matlab:424661




"G.A.M. " <x0zero@gmail.com> wrote in message 
news:fackar$51d$1@fred.mathworks.com...

*snip*

> 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...

The easy way to get this to work is to set the HitTest property for your 
plot to 'off'.

http://www.mathworks.com/support/solutions/data/1-1B03X.html?solution=1-1B03X

-- 
Steve Lord
slord@mathworks.com