Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure

Please quote your code (you can edit your post).