How to put the legend out of the plot,plt.show()