use matplotlib to display plots in gui