Title disappears sometimes somtimes not

6 ビュー (過去 30 日間)
Jürgen
Jürgen 2013 年 1 月 7 日
Hi, I generate a subplot with the code below. Normally that gives me 8 subplots with a title but for some subplots the title disappears, and when I run the code again, or when I restart matlab, it is solved or other title disappear? Strange, can I solve this? thanks for any help, regardsJ
FigH=figure('name', 'LMS errorbars Campos*Sch');
Campos=[100:10:170];
for Counter= 1:8
subplot(4,2,Counter);
title(int2str(Campos(Counter)));
hold on;
StartLijn=3+4* Counter;
EindLijn= StartLijn+3;
Y=LMS(StartLijn:EindLijn,4);
E=LMS(StartLijn:EindLijn,5);
errorbar(1,Y(1),E(1),'r*')
errorbar(2,Y(2),E(2),'b^')
errorbar(3,Y(3),E(3),'m*')
errorbar(4,Y(4),E(4),'k^')
set(gca,'XTick',[1:1:4], 'XTickLabel',{'short PC' ,'short HS' ,'long PC' ,'long HS'})
end

採用された回答

Anthony Poulin
Anthony Poulin 2013 年 1 月 7 日
Hy, I have not the problem when I run your code. I think it can be cause by a script execution...
Have you test to use the 'drawnow' function which force tu update the figure before execute the next line in your script. I think, it could works every time if you put this command between this lines, like this:
title(int2str(Campos(Counter)));
drawnow;
hold on;
  1 件のコメント
Jürgen
Jürgen 2013 年 1 月 7 日
hi, tx, seems to work ,

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by