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

Skip to content

[Bug]: diagonal lines in pcolormesh with Gouraud shading and transparency #27016

Description

@limwz01

Bug summary

Diagonal and box lines are produced by pcolormesh using a cmap with transparency.

Code for reproduction

import matplotlib.colors as m_colors
import matplotlib.pyplot as plt
import numpy as np
plt.pcolormesh(np.array([[0, 1, 2], [0, 1, 2]]),
               np.array([[0, 0, 0], [1, 1, 1]]),
               np.array([[0, 1, 2], [0, 1, 2]]),
               cmap=m_colors.LinearSegmentedColormap.from_list(
                   "", [(0, 0, 0, 0), (0, 0, 0, 1)]),
               shading="gouraud")
plt.plot()

Actual outcome

Figure_1

Expected outcome

No diagonal or box lines should appear.

Additional information

No response

Operating system

No response

Matplotlib Version

3.6.2

Matplotlib Backend

QtAgg

Python version

No response

Jupyter version

No response

Installation

None

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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions