The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Patch Callback by Face
Replies: 2   Last Post: Oct 14, 2010 7:28 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Richard Kennaway

Posts: 3
Registered: 10/14/10
Re: Patch Callback by Face
Posted: Oct 14, 2010 7:28 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Dave " <> wrote in message <hu6jik$7hi$>...
> I am using patch to generate many polygons with different colors, where each color represents a value.
> I would like to be able to click on a polygon and print what that value is in the command window. I'm attempting to do this by writing a callback for ButtonDownFcn.

I'm trying to do the same sort of thing: I need to know which polygon in a patch was hit and where the hit point is. I looked at datacursormode, and it only tells me the hit point, not the polygon; besides which, it insists on displaying the hit point on the screen, which I don't want.

Matlab must have calculated this information to detect the hit. Is there any way to make it pass it on to me?

Richard Kennaway
School of Computing Sciences,
University of East Anglia, Norwich NR4 7TJ, U.K.

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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.