How to export plot with multiple axes.

Hello, i want to export the following plot with 2 axes. (Scroll right to see the plot)
1.) How is it possible to choose both axes/graphs used in the plot to be exported in one file?
2.) How happens that i have two y-axes on the left side of the plot?
Thanks in advance!

댓글 수: 1

Rik
Rik 2022년 6월 7일
I recovered the removed content from the Google cache (something which anyone can do). Editing away your question is very rude. Someone spent time reading your question, understanding your issue, figuring out the solution, and writing an answer. Now you repay that kindness by ensuring that the next person with a similar question can't benefit from this answer.

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

답변 (1개)

Walter Roberson
Walter Roberson 2022년 5월 22일

1 개 추천

I would suggest that you create a uipanel(), and parent the axes to the uipanel, and then exportgraphics() the uipanel.
Or, exportgraphics the figure itself.
Your line
ax2.XAxisLocation = 'top';
is what is causing the second X axis information to be at the top.

댓글 수: 4

Mapete
Mapete 2022년 5월 22일
Thanks for your quick answer.
I made a mistake in my question, i want to know why i have two left Y-AXES.
ax2 = axes(t)
That is not addressing the second axis of the yyaxis: it is creating an additional axes in the tiled layout. You now have three axes: ax1 left, ax1 right, and ax2.
Mapete
Mapete 2022년 5월 22일
Ok, but if i remove the ax2 = axes (t) the plot only shows the first graph.
Why are you not using
yyaxis left

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

카테고리

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

태그

질문:

2022년 5월 22일

댓글:

Rik
2022년 6월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by