Closed
Description
I don't know if this is intended behavior, but an AnchoredOffsetBox outside the axes will be cut off if bbox_inches='tight'
.
To reproduce:
from matplotlib.offsetbox import AnchoredOffsetbox, TextArea
ax = plt.gca()
ax.plot([0,1])
anchored_box = AnchoredOffsetbox(
loc=6,
child=TextArea("hello"),
frameon=True,
bbox_to_anchor=(1, 0.8),
bbox_transform=ax.transAxes,
)
ax.add_artist(anchored_box)
plt.gcf().canvas.print_figure('test.png', format='png', bbox_inches='tight')
gives
This is reproduced with current master (8162371).
Metadata
Metadata
Assignees
Labels
No labels