Bar plots side by side in order to compare two results
19 views (last 30 days)
Show older comments
Hey there,
Can anybody help me to plot bars side by side to compare two results with each other. I tried to plot but its showing all in same color one can not understand which one is main and which one is simulated (attached pdf figure).
Thank you
Main_Result=[71.8943958972499,73.1599650339407,79.2221466852493,79.8150647663532,85.9527729032264,87.9832209598709,88.1970423956407,95.5240684940197,103.085252881222,104.041369074693,108.297459383997,109.197002401804,110.409427101491,114.778531906828,120.001681488068,124.818387639841,108.448939327918,89.5287451440876,86.6611435160159,89.6231043918805,89.0669481519289,89.0845799138897,86.2382558933409,88.9280681525311,94.4068301311939,95.4933363708830,90.4509724048415,92.9091625394490,92.9491026859685,92.1102408222733,103.335623944370,106.104954372213,114.082191262803,97.7861363909346,92.1415914706343,93.3456939687450,90.3271860400577,91.0228789010002]
Simulated_Result=[70.7575695869661,74.5652310584642,79.1288305371798,83.3666601444024,87.4738992447549,90.8960520110488,94.1152312324349,98.8895788022377,102.036824262390,106.126020233880,110.772344914403,114.621467576278,118.391277821445,122.248906302057,126.397246652750,130.312332432254,108.058636760138,99.8012128232861,94.6684252685830,92.8603803927030,90.7701516626222,88.8625507765623,86.9484778383820,90.5359887675296,93.3101357788164,94.1859581516244,81.8060991048664,85.6667896779240,90.8284117091386,93.8454516957460,96.2048526232170,98.8539541180835,101.610760927553,91.7055128872497,91.6141248373876,92.3442690035677,91.4157582345856,91.8602319014619]
0 Comments
Accepted Answer
Bhaskar R
on 20 Nov 2019
You can display in many ways out of these stating two ways
% side by side
bar([Main_Result', Simulated_Result']), legend('Main\_Result','Simulated\_Result' );
% overlap
bar(Main_Result), hold on ;bar(Simulated_Result),legend('Main\_Result','Simulated\_Result' );
2 Comments
Bhaskar R
on 20 Nov 2019
Yes, you can apply . For usage and more other features see the help
More Answers (0)
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!