Testing if a given X, Y coordinate is within the bounds of a patch (or array of many patches)
Show older comments
I have a circular, polar plot-like figure that is divided into many (80) patch objects. It is based on the bullseye script: http://www.mathworks.com/matlabcentral/fileexchange/16458-bullseye-polar-data-plot
My problem is that I have an external input of X, Y coordinates and I need a function to test if a set of given x, y coordinates is within the area delineated by one patch object, or many patch objects. I intend to set particular patch objects as "active" or "inactive" - so need to test if the input coordinates are within an active patch object.
I'm not sure about the best way to go about this - or if it's even possible without doing many, many complex computations?
Thanks for any help.
Answers (1)
Walter Roberson
on 14 Apr 2011
0 votes
Perhaps just turn the Hittest property of the inactive patches to 'off' ?
Categories
Find more on Polar Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!