how to create a function that outputs a matplotlib figure?,plt.figure().canvas.draw()