From reading online (such as here, although they import pylab rather than pyplot, from which I have the same result), when using pyplot's show method, it should automatically rescale the figure to include the legend if it's been placed outside the main graph; however, that does not appear to be happening with my code.
Does anyone have any ideas about how to do this? Thanks.
# Cut down example of graph drawing, with cut-off legend
plt.xlim([0,1])
plt.ylim([0,1])
line_x = line[t2][0::2]
line_y = line[t2][1::2]
plt.plot(line_x, line_y, label="Line")
plt.grid("on")
plt.tight_layout()
plt.legend(bbox_to_anchor=(1.01, 0.5), loc="center left")
plt.show()