# NOT RUN {
# using stat_rgba()
ggplot(longlake_osm, aes(x, y)) +
stat_rgba(aes(red = band1, green = band2, blue = band3, alpha = 1),
limits_red = NULL, limits_green = NULL, limits_blue = NULL,
limits_alpha = NULL, interpolate = TRUE) +
coord_fixed()
# }
# NOT RUN {
# using ggraster() with stat = 'rgba'
ggraster(longlake_osm, aes(red = band1, green = band2, blue = band3, alpha = 1),
stat = "rgba")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab