How to position the default interactivity bar?

I'm referring to the toolbar with things like Zoom in, Zoom out, Home, etc. Right now, its default position is to cover my xticklabel. Is there a way I can specify its position?
Thanks.

답변 (2개)

Ajay Pattassery
Ajay Pattassery 2020년 2월 21일

0 개 추천

I am not sure of moving the figure toolbar, but you could remove it from the figure using the following command
ax = gca;
ax.Toolbar.Visible = 'off'; % Turns off the axes toolbar
Refer the following answer for more information.

댓글 수: 2

Leon
Leon 2020년 2월 21일
Many thanks! Unfortunately, I do need the bar to be available to my users.
Ajay Pattassery
Ajay Pattassery 2020년 2월 24일
편집: Ajay Pattassery 2020년 2월 24일
I assume you have reason to keep the xticklabels on the top of the graph.
You can try rotating the ticklabels using xtickangle.
For moving the ticklabels you can refer to the following answer too.

댓글을 달려면 로그인하십시오.

Jessa
Jessa 2026년 5월 15일 15:29

0 개 추천

For any users looking for a solution to a similar problem in the future -- starting in MATLAB R2026a, there's a new `ToolbarLocation` property on the axes that gives you some control over where the axes toolbar is positioned:
ax.ToolbarLocation = "outside"; % above the axes (default)
ax.ToolbarLocation = "inside"; % inside the axes, top-right corner
You could try moving it "inside" in this case.

카테고리

도움말 센터File Exchange에서 Axis Labels에 대해 자세히 알아보기

제품

릴리스

R2019b

질문:

2020년 2월 18일

답변:

2026년 5월 15일 15:29

Community Treasure Hunt

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

Start Hunting!

Translated by