import matplotlib.pyplot as plt
fig, ax = plt.subplots(figsize=(10, 10), tight_layout=True)
ax.plot([-0.5, 0.6], [1, 1.35])
xlabel = ax.set_xlabel("TEST")
y = xlabel.get_window_extent().transformed(ax.transAxes.inverted()).y0
ax.text(s='TEST_position', x=0.25, y=y, transform=ax.transAxes)
The text ‘TEST_position’ should be placed at the same y-position of the xlabel. My approach does not work.