フィルターのクリア

Change the location of a text in a plot

4 ビュー (過去 30 日間)
Tala Hed
Tala Hed 2018 年 3 月 29 日
回答済み: Star Strider 2018 年 3 月 29 日
I have a simple problem which is taking a lot of time. I have 2 texts (white and yellow) in a graph which overlap. How can I separate them? The code and plot is attached. Thank you in advance
if true
% font_size = 14;
Peak=text(0, font_size, ['Height (feet): ' num2str((length(Im)-min(y))*(8.5/470))], 'Color', 'white','FontSize',font_size);
Angle=text(0.5, font_size, ['Theta (degrees): ' num2str(theta)], 'Color', 'yellow','FontSize',font_size);
end

採用された回答

Star Strider
Star Strider 2018 年 3 月 29 日
Your text call is interpreting your ‘font_size’ variable as the y-coordinate.
The solution is to use different y-coordinates for each text call.

その他の回答 (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