# Error: # After saving your plots, the legend (that you might have placed # outside the plot) is being cut off. # Solution: # Add bbox_inches='tight' plt.savefig('samplefigure', bbox_inches='tight')