How to reduce the left margin of plot with PyPlot?

Hello,
I am plotting with PyPlot adding a legend on the right side with

    legend(handles = [active_contour, passive_contour],  bbox_to_anchor=[1.2,1], loc=2, borderaxespad=0, title="Margins",  fancybox="true")

The legend ends up outside the margins of the plot.
How can I reduce the left margin to better accommodate for the legend?
Thank you