axes hittest and pickableparts properties ignored if axes parent is a figure
4 views (last 30 days)
Show older comments
Hello, I'm working on function for zoom orientation. The Fcn changes width and height of an existing axes and adds two new axes, xOrientation and yOrientation plus xSlider and ySlider. Zoom should be possible only on the main axes, not the small orientation axes. Therefor I set the hittest and pickableparts properties to off/none.
% create x axes orientation window
handles.xWin = axes('Units','normalized',...
'Parent',handles.axhParent,...
'Position',xWinPos,...
'Color',BgColor,...
'XColor',xtickColor,...
'YColor','none',...
'NextPlot','add',...
'ClippingStyle','rectangle',...
'Box','off',...
'HitTest','off',...
'PickableParts','none',...
'XScale',xscale,...
'FontSize',7,...
'Tag','xWin');
If handles.axhParent is a uitab, like in the screenshot, hittest and pickableparts properties of those two new axes are accepted. You cannot zoom in those axes. But if handles.axhParent is a figure, the properties are ignored and you can zoom in or out in those axes. Why is that? Thank you for your help! Best regards
0 Comments
Answers (3)
Image Analyst
on 11 Mar 2016
Regardless of which axes, how is the user telling your app that he wants to zoom in on the data? Exactly what do the scrollbars do? Control the width of the zoomed window? How are you setting the location? Why don't you have two scrollbars, one for the left index (or bottom ylim value), and one for the right index (or top ylim value)?
See Also
Categories
Find more on Interactive Control and Callbacks 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!