8000 Error out when x/y are passed as kwargs. · matplotlib/matplotlib@434a6a5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 434a6a5

Browse files
committed
Error out when x/y are passed as kwargs.
We only support passing them positionally; right now passing them as kwargs silently does nothing. The error message is the standard one for unknown kwargs.
1 parent b07377f commit 434a6a5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@ def __call__(self, *args, **kwargs):
172172
if yunits != self.axes.yaxis.units:
173173
self.axes.yaxis.set_units(yunits)
174174

175+
for pos_only in "xy":
176+
if pos_only in kwargs:
177+
raise TypeError("{} got an unexpected keyword argument {!r}"
178+
.format(self.command, pos_only))
179+
175180
if not args:
176181
return
177182

0 commit comments

Comments
 (0)
0