Overlaying imshow with transparancy / alpha yields different results in pdf and png when using savefig #18871
Labels
status: closed as inactive
Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.
status: inactive
Marked by the “Stale” Github Action
topic: color/alpha
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug summary
When using multiple calls to
plt.imshow()
with transparancy/alpha on the top image, the .pdf and .png versions are inconsistentCode for reproduction
Code for reproduction below, also available as a binder at https://mybinder.org/v2/gist/TAdeJong/8cb84dc74bc6d2c2a1744ef465bf85d8/HEAD .
Effect can be even more noticable when overlaying actual images, but for simplicity this example keeps it a single colors:
Actual outcome
Output files:

Colors in output files seem consistent between different OS and viewers.
Expected outcome
Produced colors being consistent between different output formats, i.e. a equal color for each of the respective squares between the PNG and PDF output.
OR a clear warning in the documentation (I am not aware of such a warning existing, but I might have missed it).
Matplotlib version
print(matplotlib.get_backend())
): module://ipykernel.pylab.backend_inline / TkAgg#Edit: fix mybinder link.
The text was updated successfully, but these errors were encountered: