Skip to content

Make HandlerLine2D{,Compound} inherit constructors from HandlerNpoints. #20986

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

Merged
merged 1 commit into from
Sep 3, 2021
Merged
Changes from all commits
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
27 changes: 0 additions & 27 deletions lib/matplotlib/legend_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,19 +214,6 @@ class HandlerLine2DCompound(HandlerNpoints):
a line-only with a marker-only artist. May be deprecated in the future.
"""

def __init__(self, marker_pad=0.3, numpoints=None, **kwargs):
"""
Parameters
----------
marker_pad : float
Padding between points in legend entry.
numpoints : int
Number of points to show in legend entry.
**kwargs
Keyword arguments forwarded to `.HandlerNpoints`.
"""
super().__init__(marker_pad=marker_pad, numpoints=numpoints, **kwargs)

def create_artists(self, legend, orig_handle,
xdescent, ydescent, width, height, fontsize,
trans):
Expand Down Expand Up @@ -286,20 +273,6 @@ class HandlerLine2D(HandlerNpoints):
artist for the line and another for the marker(s).
"""

def __init__(self, marker_pad=0.3, numpoints=None, **kw):
"""
Parameters
----------
marker_pad : float
Padding between points in legend entry.
numpoints : int
Number of points to show in legend entry.
**kwargs
Keyword arguments forwarded to `.HandlerNpoints`.
"""
HandlerNpoints.__init__(self, marker_pad=marker_pad,
numpoints=numpoints, **kw)

def create_artists(self, legend, orig_handle,
xdescent, ydescent, width, height, fontsize,
trans):
Expand Down