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

13 次查看(过去 30 天)
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.

回答(1 个)

phenan08
phenan08 2022-5-22
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!

类别

Help CenterFile Exchange 中查找有关 Log Plots 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by