8000 [Bug]: markerfacecoloralt not supported when drawing errorbars · Issue #23375 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
[Bug]: markerfacecoloralt not supported when drawing errorbars #23375
Closed
@wqian94

Description

@wqian94

Bug summary

Although the documentation says that all Line2D kwargs should be supported, only a small handful actually are:

for key in ['marker', 'markersize', 'markerfacecolor',

markerfacecoloralt is not among that list.

Code for reproduction

import numpy as np
import matplotlib.pyplot as plt

# example data
x = np.arange(0.1, 4, 0.5)
y = np.exp(-x)

# example error bar values that vary with x-position
error = 0.1 + 0.2 * x

fig, ax = plt.subplots(1, 1)
ax.errorbar(x, y, yerr=error, fmt='-o', markerfacecoloralt='white')
ax.set_title('variable, symmetric error')

Actual outcome

AttributeError: 'LineCollection' object has no property 'markerfacecoloralt'

Expected outcome

No error

Additional information

markerfacecoloralt needs to be added to this list:

for key in ['marker', 'markersize', 'markerfacecolor',

Better yet, automagically check against the signature of Line2D.

Operating system

Ubuntu 20.04.4

Matplotlib Version

3.5.2

Matplotlib Backend

QtAgg

Python version

3.8.10

Jupyter version

No response

Installation

pip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0