truncated plot displayed adding the size
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi,
I am trying to set the size of my graph. I simply added at the end of set 'units','points','position',[70,70,750,200], as you can see in the code. Unfortunatlly it appears a truncated plot. How can I see the whole plot with the dimension I settled?
figure('DefaultAxesFontSize',16)
semilogy([45,45],[10^-5,1],'--r')
hold on
semilogy([80,80],[10^-5,1],'--r')
xlabel ('x','FontSize', 18)
ylabel ('y','FontSize', 18)
ylim([10^-4,1])
xlim([30,220])
tickposx = [30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 ];
tickposy = [ 10^-5 10^-4 10^-3 10^-2 10^-1 1];
grid on
set(gca, 'XTick', tickposx, 'YTick', tickposy,'units','points','position',[70,70,750,200])
댓글 수: 0
채택된 답변
Les Beckham
2023년 2월 14일
figure('DefaultAxesFontSize',16)
semilogy([45,45],[10^-5,1],'--r')
hold on
semilogy([80,80],[10^-5,1],'--r')
xlabel ('x','FontSize', 18)
ylabel ('y','FontSize', 18)
ylim([10^-4,1])
xlim([30,220])
tickposx = [30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 ];
tickposy = [ 10^-5 10^-4 10^-3 10^-2 10^-1 1];
grid on
% set(gca, 'XTick', tickposx, 'YTick', tickposy,'units','points','position',[70,70,750,200])
set(gca, 'XTick', tickposx, 'YTick', tickposy)
set(gcf, 'units', 'points', 'position', [70,70,750,200]) %<< Set position of the figure, not the axes
댓글 수: 0
추가 답변 (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!