Skip to content

Commit 463125c

Browse files
committed
Deprecate passing kwargs to Shadow
1 parent bc04c8a commit 463125c

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

doc/api/next_api_changes/deprecations.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,9 @@ Likewise, passing the *alpha*, *boundaries*, *values*, *extend*, or *filled*
106106
parameters with a `.ContourSet` mappable, or the *alpha* parameter with an
107107
`.Artist` mappable, is deprecated, as the mappable would likewise override
108108
them.
109+
110+
Unused parameters
111+
~~~~~~~~~~~~~~~~~
112+
The following parameters do not have any effect and are deprecated:
113+
114+
- arbitrary keyword arguments to `Shadow`

lib/matplotlib/patches.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -631,15 +631,25 @@ def __str__(self):
631631
@docstring.dedent_interpd
632632
def __init__(self, patch, ox, oy, props=None, **kwargs):
633633
"""
634-
Create a shadow of the given *patch* offset by *ox*, *oy*.
635-
*props*, if not *None*, is a patch property update dictionary.
636-
If *None*, the shadow will have have the same color as the face,
634+
Create a shadow of the given *patch*.
635+
636+
By default, the shadow will have the same face color as the *patch*,
637637
but darkened.
638638
639-
Valid keyword arguments are:
639+
Parameters
640+
----------
641+
patch : `.Patch`
642+
The patch to create the shadow for.
643+
ox, oy : float
644+
The shift of the shadow in points.
645+
props : dict
646+
Properties of the shadow patch. Supported keys are:
640647
641-
%(Patch)s
648+
%(Patch)s
642649
"""
650+
if kwargs:
651+
cbook.warn_deprecated(
652+
"3.3", "Passing keyword arguments to Shadow is deprecated.")
643653
Patch.__init__(self)
644654
self.patch = patch
645655
self.props = props

0 commit comments

Comments
 (0)