Matplotlib customize the legend to show squares instead of rectangles,plt.show()