Skip to content

[Bug]: Setting 'lines.markeredgecolor' affects color of errorbar caps. #29780

Closed
@ProodjePindakaas

Description

@ProodjePindakaas

Bug summary

When setting a color in rcParams for lines.markeredgecolor this color is used for the errorbar caps when plotting with errorbar. No option is able to override this color again.

Code for reproduction

import matplotlib as mpl
import matplotlib.pyplot as plt

mpl.rcParams['lines.markeredgecolor'] = 'r'

x = range(10)
y = range(10)
yerr = [1]*10

plt.errorbar(x,y,yerr=yerr, capsize=10)
plt.show()

Actual outcome

color of errorbar caps is red
Image

Expected outcome

color of errorbar caps is blue
Image

Additional information

No response

Operating system

Linux

Matplotlib Version

3.10.0

Matplotlib Backend

qtagg

Python version

3.13.2

Jupyter version

No response

Installation

conda

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions