Skip to content

[Bug]: Axes.grid(color) ignores alpha #22231

Open
@mreiche

Description

@mreiche

Bug summary

When using Color like described here https://matplotlib.org/stable/tutorials/colors/colors.html for the Axes grid, the alpha value is ignored.

Code for reproduction

import numpy as np
fig, ax = plt.subplots()
rng = np.random.default_rng(12345)
ax.plot(rng.integers(low=0, high=10, size=3))
ax.grid(color=(0.8, 0.8, 0.8, 0))
fig.show()

Actual outcome

image

Expected outcome

image

Additional information

No response

Operating system

Windows

Matplotlib Version

3.5.1

Matplotlib Backend

module://backend_interagg

Python version

3.9.2

Jupyter version

No response

Installation

pip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions