I am making figures for a paper, and I want to put a label some fixed distance from the top-left corner of the plot. ax.text(x, y, label, transform=ax.transAxes) nearly does this, but specifies the position as a fraction of the size of the plot. If I could get the absolute size of the plot area I could use that to convert. For example, in the following script how could I get the height and width?
Edit: I want the height and width just of the plot (not of the whole figure), and excluding the labels, ticks, etc.
from matplotlib import pyplot as plt
import numpy as np
data = np.random.rand(10,10)
fig, ax = plt.subplots()
ax.pcolormesh(data)
ax.set_aspect("equal")
# get width and height of plot here?
plt.show()

fig.get_size_inches()?