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!