How to change the position of the subtext?
2 ビュー (過去 30 日間)
古いコメントを表示
Dear all,
I am adding text to the figure using the next command:
text('string','NO_{x}','Units','normalized','position',[0.24,0.45],'fontsize',18,'backgroundcolor','none','edgecolor','none','color',[238 154 7]./255,'fontname','arial')
I was expecting that the 'x' would not be too low but the text came out in the figure like this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1359713/image.png)
How am I supposed to adjust the relative position of a subtext? I know that using latex interpreter would make it seem much better but is there any other options to keep the font style at the same time?
Thanks in advance.
0 件のコメント
回答 (1 件)
Sufiyan
2023 年 4 月 25 日
Hi,
You can try separating the subtext into a second ‘text’ object. You can adjust the x and y coordinates of second text object as needed to change the position of the subtext.
text('string','NO','Units','normalized','position',[0.24,0.45],'fontsize',18,'backgroundcolor','none','edgecolor','none','color',[238 154 7]./255,'fontname','arial')
text('string','x','Units','normalized','position',[0.32,0.41],'fontsize',13,'backgroundcolor','none','edgecolor','none','color',[238 154 7]./255,'fontname','arial','VerticalAlignment','bottom')
Hope this helps!
参考
カテゴリ
Help Center および File Exchange で MATLAB Report Generator についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!