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

pcolorimage/pcolorfast silently drops alpha #13328

Open
Labels
keepItems to be ignored by the “Stale” Github Actiontopic: color/alpha
@anntzer

Description

@anntzer

Bug report

Bug summary

When pcolorfast uses pcolorimage mode (i.e., for rectangular meshes with unequal spacing), an alpha keyword gets silently dropped even though there appears to be code to handle that in the definition of pcolorfast:

elifstyle=="pcolorimage":im=mimage.PcolorImage(self,x,y,C,cmap=cmap,norm=norm,alpha=alpha,# <- here**kwargs)

Code for reproduction

plt.gca().pcolorfast(    [4,8,10], [7,8,10,11],np.array([[0,1], [2,3], [4,5]]),alpha=.5,cmap="viridis")

Actual outcome

The alpha channel is not applied. Compare e.g. with

plt.gca().pcolorfast(    (0,1), (2,3),np.array([[0,1], [2,3], [4,5]]),alpha=.5,cmap="viridis")

which uses AxesImage and correctly applies alpha.

Expected outcome

per above

Matplotlib version

  • Operating system: linux
  • Matplotlib version: 3.0 and master
  • Matplotlib backend (print(matplotlib.get_backend())): qt5agg
  • Python version: 3.7
  • Jupyter version (if applicable): n/a
  • Other libraries: n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    keepItems to be ignored by the “Stale” Github Actiontopic: color/alpha

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp