Is there a way to position text in a figure by the fraction of the axis? I want the text in the same position for all my plots regardless of their differing ranges in x and
You can use the transform keyword:
transform
import matplotlib.pyplot as plt import numpy as np fig = plt.figure() ax = fig.add_subplot(1, 1, 1) ax.plot(np.arange(10),12*np.arange(10)) ax.text(0.4, 0.7, 'Correct Position', transform=ax.transAxes) plt.show()