필터 지우기
필터 지우기

MATLAB : resize figure, axis does not move

조회 수: 2 (최근 30일)
Sarah Guiffray
Sarah Guiffray 2015년 7월 15일
댓글: Brendan Hamm 2015년 7월 15일
Hello,
I have a figure with 2 x-axis. But when I resize the figure, the second axis (on the top) does not move.
I declare the second axis like this :
ax2 = axes('Position',get(ax1,'Position'),... 'XAxisLocation','top',... 'YAxisLocation','right',... 'Color','none',... 'XColor','k','YColor','none');
set(ax2, 'XLim', get(ax1, 'XLim'),'YLim', get(ax1, 'YLim'));
set(ax2, 'XTick', get(ax1, 'XTick'), 'YTick', get(ax1, 'YTick'));
set(ax2, 'YTick', []);
How can I resolve this problem ?
  댓글 수: 1
Brendan Hamm
Brendan Hamm 2015년 7월 15일
Can you format the code for your ax2 definition using the '{ } Code' button.
I cannot reproduce your problem, assuming it is the overhang of the second axis which is of issue. Would you mind providing more code for this?

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by