http://manual.gromacs.org/documentation/5.1/onlinehelp/gmx-analyze.html
For error bars in a single trajectory (block averaging) use the -ee option:
"Option -ee produces error estimates using block averaging. A set is divided in a number of blocks and averages are calculated for each block. The error for the total average is calculated from the variance between averages of the m blocks B_i as follows: error^2 = sum (B_i - <B>)^2 / (m*(m-1)). These errors are plotted as a function of the block size."
The command line is:
gmx analyze -f msd_all_DPPC.xvg -ee err_dppc
Error bars can also be added with the option -errbar, but only if you have multiple replicas of the same system. The errorbars can represent the standard deviation.
The command line is:
gmx analyze -f msd_all_DPPC.xvg -ee err_dppc -errbar stddev
Sofia