Alter axis size
조회 수: 6 (최근 30일)
이전 댓글 표시
How do I alter the size of the current axis within a figure? I've tried set(gca,'Position',[.. .. .. ..]), but the axis just disappears.
댓글 수: 0
채택된 답변
Jan
2011년 10월 2일
Then the part "[.. .. .. ..]" moves the axes out of the visible area of the figure. It would be helpful, if you post the original command instead of masking the interesting part by dots. Try this:
figure('Units', 'pixels', 'Position', [100, 100, 600, 400]);
AxesH = axes;
pause(1);
set(AxesH, 'Units', 'pixels', 'Position', [10, 10, 200, 200]);
pause(1);
set(AxesH, 'Units', 'normalized', 'Position', [0.5, 0.5, 0.4, 0.4]);
추가 답변 (1개)
Grzegorz Knor
2011년 10월 2일
Try:
set(gca,'Units','normalized','Position',[x y w h])
where x, y, w, h belong to the interval [0 1].
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!