Path: news.mathworks.com!not-for-mail
From: "Daphne " <daphnew_too_nospam@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Datatip (Datacursormode)
Date: Fri, 9 May 2008 17:35:04 +0000 (UTC)
Organization: Technion
Lines: 71
Message-ID: <g02208$r3i$1@fred.mathworks.com>
References: <g00qvj$4gu$1@fred.mathworks.com> <g016ot$gva$1@fred.mathworks.com>
Reply-To: "Daphne " <daphnew_too_nospam@yahoo.com>
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 1210354504 27762 172.30.248.37 (9 May 2008 17:35:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 9 May 2008 17:35:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1066798
Xref: news.mathworks.com comp.soft-sys.matlab:467626



Thanks, That's very helpful!
If you do find a way to mark the datatips I would 
appreciate it. 

Daphne


"helper " <spamless@nospam.com> wrote in message 
<g016ot$gva$1@fred.mathworks.com>...
> "Daphne " <daphnew_too_nospam@yahoo.com> wrote in 
message 
> <g00qvj$4gu$1@fred.mathworks.com>...
> 
> > I would like to mark the start and end of those lines 
> > with data tips programmatically. 
> 
> Good question.  I don't think you can do this.  I will 
> investigate more and get back to you if I find a way, 
> though.
> 
> > Another related question, is there a way to move the 
data 
> > tips' flag to the bottom right position 
programmatically? 
> 
> You can do this by setting the "DisplayStyle" property 
of 
> the datacursor mode to "window".
> 
> dcm_obj = datacursormode;
> set(dcm_obj,'DisplayStyle','window')
> 
> 
> Note, however, that you can only display one data point 
at 
> a time using "window".  This conflicts with your desire 
to 
> have 2 data points (start and end).
> 
> 
> > Last question, can I limit the datacursormode to the 
> > specific axes, so that the user doesn't, by mistake, 
> click 
> > on something in one of the other axes? 
> 
> 
> You cannot eliminate use of the datacursor from a 
specific 
> axes directly.  You can, however, eliminate use of the 
> datacursor on specific plots by setting the "HitTest" 
> property of the line object to "off".
> 
> For example:
> 
> hPlot = plot(1:10);
> set(hPlot,'HitTest','off')
> 
> I suppose you can FINDALL objects on a specific axes 
> of "Type" "line" and set their properties using:
> 
> hPlots = findall(h,'type','line');
> set(hPlots,'hittest','off')
> 
> where "h" is the handle to the axes.  However, you will 
> need to reissue this command whenever a new plot is 
placed 
> on that axes.
> 
> Good luck