- Use "xtickformat" function to update date labels automatically on zooming>> xtickformat(app.UIAxes,'MMM-yyyy');
- You can also use "LimitsChangedFcn" to set a custom callback function. For example: >> app.UIAxes.XAxis.LimitsChangedFcn = @(src,event)updateDateXTicks(app);
Why do I receive the error "Error using enableLegacyExplorationModes" when using "axtoolbar" with "PostActionCallback" on "uifigure" in MATLAB R2025a?
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 5 Fév 2026 à 0:00
Réponse apportée : MathWorks Support Team
le 17 Fév 2026 à 21:11
I have created a custom axes toolbar using "axtoolbar". I also have a "uifigure", for which, date labels disappear on zooming in. I want to enable a callback method on zooming my "uifigure" so that I can manually update these labels in the callback. I am using "PostActionCallback" to attach a callback to "uiaxes" for zooming my "uifigure". Why do I get an error "Error using enableLegacyExplorationModes. Custom axes toolbar found. Call enableLegacyExplorationModes before customizing the axes toolbar."? And how can I update date labels automatically on zooming in "uifigure"?
Réponse acceptée
MathWorks Support Team
le 5 Fév 2026 à 0:00
This is expected behavior as "PostActionCallback" method is not supported without going into legacy mode. Using custom toolbar is not possible in legacy mode.
The interaction behavior in figures created in R2024b and earlier versions of MATLAB is called "legacy exploration modes". In legacy exploration modes, you can control interaction behavior only on a per figure basis. So, in legacy exploration modes, all the axes inside a given figure always have the same interaction modes. For more information on legacy exploration modes, please refer to the legacy exploration modes documentation.
Instead of using "PostActionCallback", you can follow the below approaches:
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Data Exploration dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!