Matlab UIAxes "restore view" not using set X limits.
조회 수: 7 (최근 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.
댓글 수: 0
답변 (1개)
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!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!