How to add a 'No Data' label on a Bar plot
Afficher commentaires plus anciens
I already got my bar plot like the picture below but how do I display 'No data' on it
like in this picture
this is my code, thank you.month = {'Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Ogos','Sep', 'Okt', 'Nov', 'Dis'};
GPS =[35.5 71.4 77.4 70 35.5 36.7 22.6 9.7 13.3 NaN NaN 6.5];
SucRate= [12.9 64.3 71 66.7 25.8 23.3 22.6 0 0 NaN NaN 0];
Solar = [137.2 126 125.1 129.9 122.6 130.8 110.5 109.2 103.1 104.1 107.2 109.2];
yyaxis left
b = bar(GPS,'FaceColor',[0.2 0.2 0.5]);
hold on
b1= bar(SucRate,'FaceColor',[0 0.7 0.7]);
ylim([0 100]);
yyaxis right
p = plot(Solar,'-.ko');
ylim([100 170]);
set(gca, 'xticklabel', month )
xlabel('Bulan')
yyaxis left
ylabel('Kadar Kejadian Bulanan (%)','Color','k')
yyaxis right
ylabel('Purata Bulanan Fluks Suria F10.7','Color','k')
ax = gca;
ax.YAxis(1).Color = 'k';
ax.YAxis(2).Color = 'k';
p.LineWidth = 2;
t= text(11,160,'2015');
t(1).FontSize = 18;
legend({'Hari Kejadian','Hari Kejadian Berturutan','Fluks Suria F10.7'},'Location','northeast');
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Axis Labels dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!