I do not quite understand why I am unable to create horizontal and vertical lines at specified limits. I would like to bound the data by this box. However, the sides do not
If you want to add a bounding box, use a rectangle:
ax = plt.gca() r = matplotlib.patches.Rectangle((.5, .5), .25, .1, fill=False) ax.add_artist(r)
Rectangle doc