Alignment of textarrow text with line

13 ビュー (過去 30 日間)
Jim Hokanson
Jim Hokanson 2017 年 12 月 15 日
コメント済み: Jim Hokanson 2017 年 12 月 25 日
How would I get the text from a textarrow annotation to align with the start of a line. I am unclear how to control the textbox aspect of the textarrow.
plot(1:100)
obj.h_line = annotation('line',[0.5 0.5],[0.1 0.8],'Color',0.5*ones(1,4));
%https://www.mathworks.com/matlabcentral/answers/93858-how-can-i-rotate-a-textbox-annotation-in-matlab-7-9-r2009b
%What do I put here for x & y????? Do I need to modify another property?
obj.h_text = annotation('textarrow',[0.5 0.5],[0.1 0.5],'string',...
'textarrow annotation', 'HeadStyle','none','LineStyle',...
'none', 'TextRotation',90);
I want something like the following, except with the letters rotated so that the tops of the letters touch the line.
|
|
|t
|s
|e
|t

回答 (1 件)

Ben Drebing
Ben Drebing 2017 年 12 月 21 日
Are you looking for something that looks like this?
obj.h_text = annotation('textarrow',[0.5 0.8],[0.5 0.8],'string',...
'textarrow annotation', 'HeadStyle','none','LineStyle',...
'none', 'TextRotation',90);
  1 件のコメント
Jim Hokanson
Jim Hokanson 2017 年 12 月 25 日
Almost, but the text is not at the bottom of the line. When I make the alignment left, it shifts the text left on the screen, not down (which I would expect after a 90 degree rotation.

サインインしてコメントする。

カテゴリ

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