Sam
Sam

Reputation: 93

Matlab GUI plot is blocking my click function

I have a figure in my GUI that has a clickable callback function assigned to it. It works fine, but I have a filled shape plot that blocks my clicks. Basically, I can click anywhere within the plotting area and it does what I've programmed, but, when I click on the filled shape, it doesn't register. I've tried setting axis.Layer = "top" and it doesn't fix the problem.

How do I make the plot invisible to clicks, but still visible to the eye?

EDIT: There is a PickableParts option, which you can set to Visible/All/None, but Visible and All both do the same thing (ie. no clicking through the plotted data). Link to PickablePartss Description

Upvotes: 0

Views: 131

Answers (1)

Sam
Sam

Reputation: 93

To answer my question, unless I am incorrect, you can't set this in app designer. You have to programmatically do it with set(patch,'PickableArea','none'). They could have easily put an option somewhere to set all children to 'PickableArea'='none' and 'HitTest'='none', but they did not for some reason.

Upvotes: 1

Related Questions