Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!g16g2000pri.googlegroups.com!not-for-mail
From: rodney.thomson@gmail.com
Newsgroups: comp.soft-sys.matlab
Subject: Re: Axes tools in GUI
Date: Thu, 26 Jun 2008 18:29:42 -0700 (PDT)
Organization: http://groups.google.com
Lines: 30
Message-ID: <e432d979-f637-4ab4-aca0-cffe9372ee6e@g16g2000pri.googlegroups.com>
References: <g414n2$no7$1@fred.mathworks.com>
NNTP-Posting-Host: 210.193.170.117
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1214530183 17782 127.0.0.1 (27 Jun 2008 01:29:43 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 27 Jun 2008 01:29:43 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: g16g2000pri.googlegroups.com; posting-host=210.193.170.117; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) 
X-HTTP-Via: 1.0 frem-prox1.nautronix:8080 (squid/2.5.STABLE12)
Xref: news.mathworks.com comp.soft-sys.matlab:476153



On Jun 27, 6:20=A0am, "David Doria" <daviddo...@gmail.com> wrote:
> I have an axes object on my GUI that I made in guide. =A0I can
> draw things in it with "plot" or other commands like that,
> but I would like to be able to zoom and select points and
> things like that also.
>
> 1) can I get the normal toolbar that would be above the axes
> in a figure window in my gui?
>
> 2) is there a "axes clicked" type of callback that I can do
> something when the user selects a point in the axes?
>
> Thanks,
>
> Dave

1) You can have your overall GUI have the toolbar that you desire.
Using guide double click on the background of yoru GUI (typically the
figure1 property) and change the value for 'Toolbar' to 'figure'. Else
you can do "set(handles.figure1, 'Toolbar', 'figure')" in your GUI
startup function.

2) As for the 'point in the axes' do you mean A) ANYWHERE on the axis?
or B) a plotted data point within an axes?

If A : you can set the axes' ButtonDownFcn property to be a callback
function of your own desire. IE : set(handles.axes1, 'ButtonDownFcn',
@disp('You clicked!'))

If B then you want to do similar, but set it on your plot properties :)