add function to create bar plot with error bars by calling matplotlib directly