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

Document idiosyncratic behavior oftransform kwarg #12551

Open
Labels
DocumentationkeepItems to be ignored by the “Stale” Github Action
Milestone
@munkm

Description

@munkm

Bug report

Bug summary

Passingtransform=None through imshow results in a blank plot.

I've been playing around a little bit with data transforms and projections in matplotlib. For one of the things I've been testing out, I also want to see how my data looks if the transform isn't set by the user, so I passed intransform=None as a kwarg to imshow. This resulted in a blank plot. I'm not sure if this is a preferred outcome, but I personally would have expected a plot without a transform set, but the data showing.

Code for reproduction

fromnumpyimportrandomimportmatplotlib.pyplotaspltdata=random.random((20,20))fig, (ax1,ax2)=plt.subplots(2)ax1.imshow(data)ax2.imshow(data,transform=None)plt.show()

Outcome
image

Matplotlib version

  • Operating system: OSX Sierra 10.12.6
  • Matplotlib version: 2.2.2 and 3.0.0
  • Matplotlib backend (print(matplotlib.get_backend())): MacOSX
  • Python version: 3.6.5 and 3.6.6

I tried testing this script out in two different conda environments that I have on my machine with the same result. Both envs I tested this script out on use matplotlib pulled from conda-forge. One environment has v2.2.2 and the other has v3.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationkeepItems to be ignored by the “Stale” Github Action

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp