I want to add text to an axis that will display a title, but need some standardization as it will be used in a process to dynamically create axes. The text has a black background, so I want the width to be set to a number where the longest title will fit. Is there something similar to bbox that can be used?
Setup in a nutshell: there's an outergrid of 5 objects, with each having several subplots that make up an inner grid. I don't know if subplots have limited customization, but that's currently what I'm working with.
ax = plt.Subplot(fig, inner_grid[:3, :8])
ax.text(x, y, txt, rotation=0, color='white', size=10, fontweight='bold', backgroundcolor='black' )
How do I set a width?