Closed as not planned
Description
When using annotate
to draw an arrow, it does not show up in the legend.
Example code:
import matplotlib.pylab as plt
%matplotlib inline
fig, ax = plt.subplots(1)
ax.plot([0, 1], [0, 0], label='line1')
ax.plot([0, 1], [1, 1], label='line2')
ax.annotate("",
xy=(0.4,1.0),
xytext=(0.4,0.0),
arrowprops={'arrowstyle':'<->', 'color':'C7' },
label='distance')
ax.legend()
I would expect an entry "distance" in the legend, with a grey double-sided arrow as symbol.
(I use Python 3.6.0 and Matplotlib 2.0.0 from Archlinux repository)
Metadata
Metadata
Assignees
Labels
https://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesOpen a pull request against these issues if there are no active ones!Open a pull request against these issues if there are no active ones!Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.Marked by the “Stale” Github ActionMarked by the “Stale” Github Action