use matplotlib to plot bar charts