[matplotlib] Remove the legend on a matplotlib figure