[Bug]: markerfacecoloralt not supported when drawing errorbars · Issue #23375 · matplotlib/matplotlib · GitHub
Skip to content

[Bug]: markerfacecoloralt not supported when drawing errorbars #23375

Description

@wqian94

Bug summary

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

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:

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions