plt.legend(bbox_to_anchor = (1,0.5), loc = 'center right', fontsize = 15, bbox_transform=plt.gcf().transFigure) plt.subplots_adjust(left=0.0, bottom=0.1, right=0.5)