Skip to content
Closed
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