Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Bug]: Missing whitespace in _axes.py error message #30285

Closed
Milestone
@brchristian

Description

@brchristian

Bug summary

In this code from _axes.py:

try:
facecolor=mcolors.to_rgba_array(facecolor)
exceptValueErroraserr:
raiseValueError(
"'facecolor' or 'color' argument must be a valid color or"
"sequence of colors."
)fromerr

We see that the error message has been split into two lines, however it is missing a whitespace, resulting in the following typo:

argument must be a valid color orsequence of colors.

I would be very happy to tackle this myself as my first matplotlib PR if that's agreeable!

Code for reproduction

importmatplotlib.pyplotasplt# Create a simple plotfig,ax=plt.subplots()# This will trigger the facecolor error by passing an invalid colorax.bar([1,2,3], [1,2,3],facecolor='invalid_color')plt.show()

Actual outcome

ValueError: 'facecolor' or 'color' argument must be a valid color orsequence of colors.

Expected outcome

ValueError: 'facecolor' or 'color' argument must be a valid color or sequence of colors.

Additional information

No response

Operating system

No response

Matplotlib Version

3.10.0

Matplotlib Backend

No response

Python version

No response

Jupyter version

No response

Installation

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp