How to export plot with multiple axes.

13 次查看(过去 30 天)
Mapete
Mapete 2022-5-22
评论: Rik 2022-6-7
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
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
Ok, but if i remove the ax2 = axes (t) the plot only shows the first graph.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Graphics Object Properties 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by