Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Milestone
Description
Bug summary
In this code from _axes.py:
matplotlib/lib/matplotlib/axes/_axes.py
Lines 2295 to 2301 in93a421e
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
Labels
No labels