Effacer les filtres
Effacer les filtres

Matlab UIAxes "restore view" not using set X limits.

13 vues (au cours des 30 derniers jours)
Sameer Gummuluru
Sameer Gummuluru le 17 Fév 2021
I have a tiled layout in my app with 2 axes with their x axes linked. I have disabled default interactivity and changed the toolbar to show only specific buttons.
app.tiledLayout = tiledlayout(app.plotPanel,2,1);
app.axes1 = nexttile(app.tiledLayout);
app.axes2 = nexttile(app.tiledLayout);
linkaxes([app.axes1 app.axes2],'x');
plot(app.axes1, time, data1)
plot(app.axes2, time, data2)
axtoolbar(app.axes1, {'zoomin','zoomout', 'restoreview'});
axtoolbar(app.axes2, {'zoomin','zoomout', 'restoreview'})
disableDefaultInteractivity(app.axes1)
disableDefaultInteractivity(app.axes2)
xlim(app.axes1, [0 60])
The plots appear as expected. However when I interact with the plots using toolbar buttons and try to reset the view using restoreview button, the x limits are being set to to the toal time range which is [0 600] rather than [0 60]. Is there anyway to make the view alway restore to [0 60]?
Thank you for the help.

Réponses (1)

phenan08
phenan08 le 22 Mai 2022
I am facing the same issue and I do not understand why this is happening.
Should anyone have the right tip, feel free to share it!

Catégories

En savoir plus sur Log Plots dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by