How to restore default zoom behaviour after specifying ActionPostCallback

5 ビュー (過去 30 日間)
munsense
munsense 2017 年 12 月 8 日
回答済み: Divyajyoti Nayak 2025 年 6 月 13 日
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?

回答 (1 件)

Divyajyoti Nayak
Divyajyoti Nayak 2025 年 6 月 13 日
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.
set(zoom(axh),'ActionPostCallback',[]); %Sets the zoom behaviour back to default

カテゴリ

Help Center および File ExchangeData Exploration についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by