Merge pull request #1330 from apalugniok/pyplot-alphaImages

Fix PyPlot ignoring alpha values of images. Fixes #1131
This commit is contained in:
Andrew Palugniok 2017-12-19 14:19:32 +00:00 committed by GitHub
commit 1949b6fe0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -736,7 +736,7 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
z = if eltype(img) <: Colors.AbstractGray
float(img)
elseif eltype(img) <: Colorant
map(c -> Float64[red(c),green(c),blue(c)], img)
map(c -> Float64[red(c),green(c),blue(c),alpha(c)], img)
else
z # hopefully it's in a data format that will "just work" with imshow
end