Skip to content
Closed
Changes from 1 commit
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
Next Next commit
Replace hardcoded parameter names when creating error bars
Use `inspect.signature` to automagically check whether a `kwarg` is a
line argument, rather than relying on a hardcoded list.
  • Loading branch information
wqian94 committed Jun 30, 2022
commit 51d4959345c0a92785c74e4e96f0812740c91fce
7 changes: 2 additions & 5 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import functools
import inspect
import itertools
import logging
import math
Expand Down Expand Up @@ -3453,11 +3454,7 @@ def _upcast_err(err):

# Eject any line-specific information from format string, as it's not
# needed for bars or caps.
for key in ['marker', 'markersize', 'markerfacecolor',
'markeredgewidth', 'markeredgecolor', 'markevery',
'linestyle', 'fillstyle', 'drawstyle', 'dash_capstyle',
'dash_joinstyle', 'solid_capstyle', 'solid_joinstyle',
'dashes']:
for key in inspect.signature(mlines.Line2D).parameters:
base_style.pop(key, None)

# Make the style dict for the line collections (the bars).
Expand Down