x-axes are not coincident using multiple axes

2 次查看(过去 30 天)
I am using multipe axes using the code below. The top x-axis is not coincident as shown in attached file.
ax2=axes('xaxislocation','top','yaxislocation','right','color','none', 'xscale', 'log', 'yscale', 'log');
  4 个评论
Mos_bad
Mos_bad 2019-7-19
Thanks Adam, the issue was solved by your comment.
Adam Danz
Adam Danz 2019-7-19
Great! I'll move my comment to the answers section to the question is marked answered.

请先登录,再进行评论。

采纳的回答

Adam Danz
Adam Danz 2019-7-19
(Copied from comments section)
I'm wondering the same thing Jan asked. It should look something like this:
ax2 = axes(...,'Position',ax1.Position,...)
But that alone wont' align the two sets of x-ticks. You'll need to use xlim() to control the x axis limits and you'll need to set the xtick using set(h,'XTick', ...) to ensure there are the same number of ticks on each axis.

更多回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by