-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
ENH: Adds errorbar.capthick and errorbar.elinewidth to mplstyle
#31202
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
Changes from 4 commits
0f88d5f
60fa15f
b6cd569
d5ddfdb
060e315
82660d6
384dac5
9e690f2
d5232fc
97f6a32
0c95fba
58596fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4170,10 +4170,14 @@ def _upcast_err(err): | |
| # Make the style dict for caps (the "hats"). | ||
| eb_cap_style = {**base_style, 'linestyle': 'none'} | ||
| capsize = mpl._val_or_rc(capsize, "errorbar.capsize") | ||
| capthick = mpl._val_or_rc(capthick, "errorbar.capthick") | ||
| elinewidth = mpl._val_or_rc(elinewidth, "errorbar.elinewidth") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This must be moved before l.4158 |
||
| if capsize > 0: | ||
| eb_cap_style['markersize'] = 2. * capsize | ||
| if capthick is not None: | ||
| eb_cap_style['markeredgewidth'] = capthick | ||
| if eb_lines_style is not None: | ||
| eb_lines_style['linewidth'] = elinewidth | ||
|
||
|
|
||
| # For backwards-compat, allow explicit setting of | ||
| # 'markeredgewidth' to over-ride capthick. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New behavior (rcParams-backed defaults for
capthick/elinewidth) is introduced here but there are no tests exercisingrcParams['errorbar.capthick']/rcParams['errorbar.elinewidth']or their precedence vs explicitelinewidth/linewidthkwargs. Please add a test (likely inlib/matplotlib/tests/test_axes.pynear existingerrorbartests) that sets these rcParams and asserts the resulting cap markeredgewidth and errorbar LineCollection linewidth.