Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image_raster and friends should include 4 bands if alpha present #10

Open
mdsumner opened this issue Aug 1, 2021 · 0 comments
Open

Comments

@mdsumner
Copy link
Member

mdsumner commented Aug 1, 2021

doh

this should return 4 layer raster

f <- system.file("extdata/sst.tif", package = "vapour", mustWork = TRUE)
r <- raster::raster(f)
pal <- palr::sst_pal(palette = TRUE)
vr <- range(raster::values(r), na.rm = TRUE)

rgb <- palr::image_raster(r, col = scales::alpha(pal$cols, 0.5), breaks = seq(vr[1], vr[2], length.out = length(pal$cols) + 1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant