x-axes are not coincident using multiple axes
이전 댓글 표시
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
Jan
2019년 7월 19일
This code creates one axes only. So it cannot be coincident with anything else.
How do you set the position of the axes?
Adam Danz
2019년 7월 19일
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.
Mos_bad
2019년 7월 19일
Adam Danz
2019년 7월 19일
Great! I'll move my comment to the answers section to the question is marked answered.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Axes Appearance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!