8000 Annotation legend by jlecoeur · Pull Request #8292 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Annotation legend #8292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 13 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add Text, FancyArrowPatch and Annotation legend handlers to handler map
  • Loading branch information
Julien Lecoeur committed Mar 14, 2017
commit 7b35e233b3edd0033744b1212e93a72e0061c1da
8 changes: 6 additions & 2 deletions lib/matplotlib/legend.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
from matplotlib.cbook import is_string_like, silent_list, is_hashable
from matplotlib.font_manager import FontProperties
from matplotlib.lines import Line2D
from matplotlib.patches import Patch, Rectangle, Shadow, FancyBboxPatch
from matplotlib.patches import Patch, Rectangle, Shadow, FancyBboxPatch, FancyArrowPatch
from matplotlib.text import Text, Annotation
from matplotlib.collections import (LineCollection, RegularPolyCollection,
CircleCollection, PathCollection,
PolyCollection)
Expand Down Expand Up @@ -493,7 +494,10 @@ def _approx_text_height(self, renderer=None):
update_func=legend_handler.update_from_first_child),
tuple: legend_handler.HandlerTuple(),
PathCollection: legend_handler.HandlerPathCollection(),
PolyCollection: legend_handler.HandlerPolyCollection()
PolyCollection: legend_handler.HandlerPolyCollection(),
Text:legend_handler.HandlerText(),
FancyArrowPatch:legend_handler.HandlerFancyArrowPatch(),
Annotation:legend_handler.HandlerAnnotation(),
}

# (get|set|update)_default_handler_maps are public interfaces to
Expand Down
0