-
Notifications
You must be signed in to change notification settings - Fork 390
Open
Description
Implement a Handler for the feature artist which can deal with the fact that FeatureArtist does not implement the full artist api. Also, as a step up from what mpl can currently do, ensure that if a patch has no facecolor, a line handler is used instead (i.e. you get a line in the legend, rather than a box).
Code to register the handler:
from matplotlib.legend import Legend
from matplotlib.legend_handler import HandlerPatch
# Register the FeatureArtist for legend drawing.
Legend.update_default_handler_map({FeatureArtist: HandlerPatch()})