how to title of subplot
1 回表示 (過去 30 日間)
古いコメントを表示
function untitled(country1,state1,country2,state2,names,days,avg_days,dailycases)
if isempty(state1) && isempty(state2)
Index1 = strcmpi(names,country1);
dailydata1= dailycases(Index1,:);
daily_cases1 = movmean(dailydata1, avg_days);
daily__cases1=daily_cases1(1,:)
figure
subplot(2,1,1)
title('19-ee-65')
bar(days(1:end-1),daily__cases1);
Index2 = strcmpi(names,country2);
dailydata2= dailycases(Index2,:);
daily_cases2 = movmean(dailydata2, avg_days);
daily__cases2=daily_cases2(1,:)
subplot(2,1,2)
title('19-ee-66')
bar(days(1:end-1),daily__cases2);
else
Index1 = strcmpi(names(:,2),state1);
dailydata1= dailycases(Index1,:);
daily_cases1 = movmean(dailydata1, avg_days);
daily__cases1=daily_cases1(1,:)
figure
subplot(2,1,1)
title(state1)
bar(days(1:end-1),daily__cases1);
Index2 = strcmpi(names(:,2),state2);
dailydata2= dailycases(Index2,:);
daily_cases2 = movmean(dailydata2, avg_days);
daily__cases2=daily_cases2(1,:)
subplot(2,1,2)
title(state2)
bar(days(1:end-1),daily__cases2);
end
i want to give title '19-ee-65' to graph one and title '19-ee-66' to graph two how i can in IF statement
0 件のコメント
採用された回答
Jonas
2021 年 5 月 29 日
call title() after plotting (after bar() ), that should work the normal way
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Title についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!