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

Appearance settings

imshow(..., alpha=0.5) produces different results in 2.x #6540

Copy link
Copy link
Closed
@QuLogic

Description

@QuLogic
Issue body actions

I think I have whittled this down sufficiently from the Cartopy example that is failing. Running imshow(..., alpha=0.5) produces a different result in 2.0.0b1 vs. 1.5.1 (both installed via conda.)

import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl

# mpl.style.use('classic')

im = np.zeros((100, 100, 3), dtype=np.uint8)
plt.imshow(im, extent=(1, 10, 1, 10), alpha=0.5)
plt.xlim(0, 11)
plt.ylim(0, 11)

plt.savefig('imshow_alpha.png')

Using 1.5.1:
imshow_alpha_1 5 1
Using 2.0.0b1:
imshow_alpha_2 0
Using 2.0.0b1 with the classic style:
imshow_alpha_2 0_classic

GIMP tells me that the first is 50%, while the latter two are 75%.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.