How to restore default zoom behaviour after specifying ActionPostCallback
조회 수: 3 (최근 30일)
이전 댓글 표시
After altering the zoom behaviour of a figure axes inside a GUI with: set(zoom(axh),'ActionPostCallback',@datetickzoom),
later on, I make a different plot in the same GUI figure axes and don't want datetickzoom to be triggered anymore when I use the zoom. How can I disable that customised ActionPostCallback setting and basically return zoom to default behaviour?
댓글 수: 0
답변 (1개)
Divyajyoti Nayak
2025년 6월 13일
Hi @munsense
To restore the zoom behaviour back to default the same 'set' function can be used to set the 'ActionPostCallback' property to its default value([]). As per the documentation 'ActionPostCallback' also accepts cell arrays or character vectors so setting it to an empty cell array or character vector should also work.
'ActionPostCallback' documentation: https://www.mathworks.com/help/matlab/ref/matlab.graphics.interaction.internal.zoom.html?searchHighlight=ActionPostCallback&s_tid=srchtitle_support_results_5_ActionPostCallback#mw_25fc3acb-6068-41d7-bee9-bfcf904499d6
set(zoom(axh),'ActionPostCallback',[]); %Sets the zoom behaviour back to default
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Exploration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!