axes hittest and pickableparts properties ignored if axes parent is a figure
5 ビュー (過去 30 日間)
古いコメントを表示
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/157579/image.png)
0 件のコメント
回答 (3 件)
Image Analyst
2016 年 3 月 11 日
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)?
参考
カテゴリ
Help Center および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!