任意の軸座標の挿入方法
Show older comments
rs=yline(0.2,'--','LineWidth',2,'Color','black');
xlim([0 5]);
ylim([0 5]);
このようにプロットした際に点線で表したY座標0.2をこのグラフの値の間隔のまま, 挿入する方法を教えてください.
Y軸 0 0.5 1 1.5 ...
->0 0.2 0.5 1 1.5 ...
のようにプロットしたいです.
Answers (1)
Atsushi Ueno
on 8 Sep 2024
Edited: Atsushi Ueno
on 8 Sep 2024
> このようにプロットした際に点線で表したY座標0.2をこのグラフの値の間隔のまま, 挿入する方法を教えてください
rs=yline(0.2,'--','LineWidth',2,'Color','black');
xlim([0 5]);
ylim([0 5]);
yticks([0 0.2 (0.5:0.5:5)]);
2 Comments
rs=yline(0.2,'--','LineWidth',2,'Color','black');
xlim([0 5]);
ylim([0 5]);
xticks(1:5);
yticks([0.2 (0.5:0.5:5)]);
annotation('textbox',[0.07 0 0.1 0.1], ...
'String','0','FitBoxToText','on','LineStyle','none')
Categories
Find more on 書式設定と注釈 in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


