フィルターのクリア

How to Add an Alphanumeric Character to a Shape?

1 回表示 (過去 30 日間)
Rightia Rollmann
Rightia Rollmann 2017 年 2 月 5 日
編集済み: Stephen23 2017 年 2 月 5 日
How can I add the number “1” in the middle of the circle below?
r = rectangle('Position', [2 3 5 5], 'Curvature', 1, 'FaceColor', 'g'); axis equal;

採用された回答

Stephen23
Stephen23 2017 年 2 月 5 日
編集済み: Stephen23 2017 年 2 月 5 日
Use text:
>> pos = [2,3,5,5];
>> r = rectangle('Position',pos, 'Curvature',1, 'FaceColor','g'); axis equal;
>> text(pos(1)+pos(3)/2,pos(2)+pos(4)/2, '1', 'FontSize',24,...
'HorizontalAlignment','center','VerticalAlignment','middle')

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by