piermorel / gramm

Gramm is a complete data visualization toolbox for Matlab. It provides an easy to use and high-level interface to produce publication-quality plots of complex data with varied statistical visualizations. Gramm is inspired by R's ggplot2 library.
MIT License
780 stars 221 forks source link

Standard deviation on mean plots #110

Closed z-aftab closed 2 years ago

z-aftab commented 3 years ago

Awesome submission. I was just wondering if there is a way to show Mean +- Std Dev. in "stat_summary" method? Apparently the available options plot 95% CI which is not the same. Often we need to plot error bars using Std. Dev.

bergem1t commented 3 years ago

stat_summary has a parameter called "type" that lets you choose the error type. stat_summary('type','std') will do Std. Dev. Other types are possible such as S.E.M. and also custom error functions. Check out the documentation: doc stat_summary. You will see all options.

z-aftab commented 3 years ago

Thanks. Actually I was not writing the command in correct order/format. Here is what worked for me eventually as you suggested: myobject.stat_summary('type','std','geom',{'bar','black_errorbar'});