
Plotting scale bar with vertical margins
8 ビュー (過去 30 日間)
古いコメントを表示
採用された回答
dpb
2019 年 3 月 24 日
編集済み: dpb
2019 年 3 月 24 日
X=[0.2,0.1]; Y=[0.9,0.75]; E=[0.15,0.05]; % positions, bar length about midpint
hEb=errorbar(X,Y,E,'horizontal','b.', 'linewidth',1.5,'capwidth',10); % add scales
xlim([0 1]),ylim([0 1]) % just to set bounding limits on axis for viewing...
hTxt=text(X,Y,[{'Observation Radius'},{['Safe' char(10) 'Distance']}], ...
'horizontalalignment','center','verticalalignment','top','fontsize',8);
results in following which is reasonable approximation. Draw the other pieces, then hold on to add the errorbars. The '.' linestyle stops drawing line between the points; otherwise would have to add separate error bars.

NB: Must use the char(10) for the line break; \n is not interpreted as newline by default TeX interpreter.
3 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Errorbars についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

