In Excel, calculate the 95% confidence interval of a RANGE
of cells with
=CONCAT(AVERAGE(RANGE), " ± ", CONFIDENCE(1-0.95, STDEV.P(RANGE), COUNT(RANGE)))
For bar plot color schemes, please use https://color.adobe.com/explore
The dotted line is the average while the solid line shows the distribution of the data (CDF).
Requires three file dependencies:
hatchfill2.m
https://github.com/simewu/matlab-scripts/blob/main/Hatched%20Bar%20Plot/hatchfill2.m- Note: this is a modified file that enables any color to be used. The more limited original hatchfill2 can be found here.
legendflex.m
https://github.com/kakearney/legendflex-pkg/blob/master/legendflex/legendflex.mgetpos.m
https://github.com/kakearney/legendflex-pkg/blob/master/setgetpos_V1.2/getpos.m
Note: Saving a hatched plot as a PDF requires CTRL+S instead of clicking the save icon, since the legendflex is a figure in and of itself. The PDF needs to be cropped using a software like Adobe Acrobat.