Closed
Description
Bug report
Bug summary
Setting ha="right"
through the prop
kwarg breaks AnchoredText
placement.
Code for reproduction
import matplotlib.pyplot as plt
from matplotlib.offsetbox import AnchoredText
prop = {"ha": "right", "bbox": {"lw": 0.5, "facecolor": "white"}}
text_box = AnchoredText("test\ntest long text for ha", prop=prop, loc="upper right", pad=0.2)
plt.gca().add_artist(text_box)
Actual outcome
Expected outcome
I was expecting the text box to end up in the same place it does when not setting ha="right"
:
Matplotlib version
- Operating system: macOS 10.15.6
- Matplotlib version: 3.2.1 (pip-installed)
- Matplotlib backend:
module://ipykernel.pylab.backend_inline
- Python version: 3.6.10