Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Bug]: hist()'s doc for edgecolors/facecolors does not match behavior (which is itself not very consistent) #28873

Closed
@anntzer

Description

@anntzer

Bug summary

The docs for hist state

**kwargs
    `~matplotlib.patches.Patch` properties. The following properties
    additionally accept a sequence of values corresponding to the
    datasets in *x*:
    *edgecolors*, *facecolors*, *lines*, *linestyles*, *hatches*.

but this does not match actual behavior

Code for reproduction

from pylab import *
hist(randn(100), facecolor="red")  # works
hist(randn(100), fc="red")  # silently does nothing
hist(randn(100), facecolors="red")  # crashes (Rectangle.set() got an unexpected keyword argument 'facecolors')

# and likewise for edgecolor(s)

Actual outcome

See above.

Expected outcome

At least the documentation and the behavior should match. Bonus points if all three kwarg forms (facecolor/fc/facecolors) are supported.

Additional information

No response

Operating system

any

Matplotlib Version

3.10.0.dev645+gcb9cf3bbb1

Matplotlib Backend

any

Python version

3.12.2

Jupyter version

no

Installation

git checkout

Metadata

Metadata

Assignees

No one assigned

    Labels

    API: consistencyDocumentationRelease criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions