Closed
Description
Annotations using a bbox boxstyle of "round" have different (incorrect?) clipping behavior compared to a square boxstyle.
As an example, note that with matplotlib 1.4.0, the connector arrow extends inside the round box, while it is clipped for the square boxstyle. With earlier versions, both have the same clipping behavior.
import matplotlib.pyplot as plt
import matplotlib
def main():
fig, ax = plt.subplots()
ax.set(title='Matplotlib {}'.format(matplotlib.__version__))
annotate(ax, 'Round')
annotate(ax, 'Square')
plt.show()
def annotate(ax, text):
bbox = dict(fc='none')
x, y = 0.1, 0.1
if text == 'Round':
bbox['boxstyle'] = 'round'
y = 0.5
ax.annotate(text, xy=(x, y), xytext=(50, 50), size=20,
xycoords='data', textcoords='offset points',
bbox=bbox, arrowprops=dict(arrowstyle='->'))
main()
The problem persists up to and including the current HEAD, but newer versions also have the issue described in #4139 The two issues don't appear to be directly related.
Metadata
Metadata
Assignees
Labels
No labels