How to plot the max and min of a data set on a bar plot that is constructed from mean values ?
9 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have been trying to plot the max and min of a data on a bar plot generated from the mean values of the same data. barwitherr doesn't seem to work for me. I have a 51*5 matrix and have generated the bar plot by taking the mean of that matrix along every column. Now I want to plot the max and min value of every column on the same bar plot. I want something like that:
However the only difference in my case would be that instead of %error, the error bars will be presenting the max and min value. The code I used to generate the bar plot:
h=figure;
bar([1 2 3 4 5],[OS_1' OS_2']);
legend('OS-1','OS-2');
set(gca,'XTickLabel',{'5kWh','10kWh','15kWh','20kWh','25kWh'});
title('Pgrid,max = 30% of Installed power','FontSize',14);
ylabel('Ploss','FontSize',14);
xlabel('Storage Capacity','FontSize',14);
Thanks in advance :)
0 Commenti
Risposte (1)
Amit
il 21 Gen 2014
Something like this might work for you: http://www.mathworks.com/matlabcentral/fileexchange/30639-bar-chart-with-error-bars
0 Commenti
Vedere anche
Categorie
Scopri di più su Annotations in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!