Skip to content

imshow() producing "inverted" colors since 3.0.3 #14293

@cyclehome

Description

@cyclehome

Bug report

Bug summary

Since 3.0.3 imshow() produces "inverted" colors, instead of just including the image as is.

Code for reproduction

from PIL import Image
import matplotlib.pyplot as plt

img = Image.open("map.png")
plt.imshow(img)
plt.savefig("plot.png")

with this image as input:
map

Actual outcome
plot

Expected outcome
plot2
(until 3.0.2)

Matplotlib version

  • Operating system: win 7/10
  • Matplotlib version: 3.0.3, 3.1.0
  • Matplotlib backend (print(matplotlib.get_backend())): TkAgg
  • Python version: 3.7.2
  • Jupyter version (if applicable):
  • Other libraries: Pillow (6.0.0)

matplotlib installed from pip

Metadata

Metadata

Assignees

Labels

Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy