Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: ginput for 3d plots?
Replies: 2   Last Post: May 1, 2013 6:32 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
Siamak

Posts: 2
Registered: 5/1/13
Re: ginput for 3d plots?
Posted: May 1, 2013 6:32 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

gegnal@gradient.cis.upenn.edu (Geoffrey Egnal) wrote in message <a4h1uu$h1o$1@netnews.upenn.edu>...
>
> Nevermind. I just saw the above response which has the answer.
>
> Thanks,
> Geoff
>
> Geoffrey Egnal (gegnal@gradient.cis.upenn.edu) wrote:
> : I'm trying to create a user interface where the user can select points
> : on a 3D plot. I'm having trouble using ginput.
>
> : Here's what I have:
>
> : %plot original points
> : plot3(pts(1,:), pts(2,:), pts(3,:),'bo');
> : camproj(gca,'perspective')
>
> : %figure out the 2d projection of these points
> : [az,el] = view;
> : T = viewmtx(az,el);
> : tmp = T*[pts;ones(1,size(pts,2))]
> : %skip the rescaling because the 4th row is already 1
>
> : So, here's the problem - none of the resulting 2d points look anything
> : like what I get from ginput(1) and selecting a point.
>
>
> : Can anyone help me? btw - I'm running 6.1 r12 on WinNT.
>
> : Thanks,
> : Geoff
>
> --
> Geoff



You can use datacursormode as well. check the examples provide in MATLAB help for datacursormode

Regards
Siamak



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.