MATLAB Answers

Keeping plot titles in desired location

117 ビュー (過去 30 日間)
Hari krishnan
Hari krishnan 2019 年 5 月 15 日
コメント済み: Fangjun Jiang 2020 年 4 月 29 日
Hi, I am trying to keep the title of the plot towards the right side of the the figure rather than on the top. I wrote a code for doing this, but unfortunately i am not to get the desired result. Can it be done with a function other than 'title'? I tried with 'legend' and 'text', it didn't help me much. Any help to solve this will be appreciated.
for ii = 2:10:size(a,1)
str0 = sprintf('gdmatrix = %f', rowsum_for_ants_in_gdnest_matrix(ii));
str1 = sprintf('bnmatrix = %f', rowsum_for_ants_in_gdnest_matrix(ii));
str2 = sprintf('field = %f', rowsum_for_ants_in_gdnest_matrix(ii));
str3 = sprintf('home= %f', rowsum_for_ants_in_gdnest_matrix(ii));
title_obj = title({str3;str2;str1;str0});


Fangjun Jiang
Fangjun Jiang 2019 年 5 月 15 日
title_obj.Position=[You Value Specified Here]
  5 件のコメント
Fangjun Jiang
Fangjun Jiang 2020 年 4 月 29 日
The value of the position might depend on the axis. Read it first to see if you can figure it out.


その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by