[R-sig-Geo] Using facet_wrap with geom_stars for a stacked raster

Manuel Spínola m@p|no|@10 @end|ng |rom gm@||@com
Tue Jun 1 18:43:24 CEST 2021


Dear list members,

I am trying to use facet_wrap with geom_stars but I don't know how to
specify the variable argument in the facet_wrap function (I know is not
"band"), and also, how to change the labels of the strip names?

r <- read_stars(system.file("external/test.grd", package="raster"))

s1 <- c(r, r*2)

ggplot() +
  geom_stars(data = s1) +
  coord_equal() +
  facet_wrap(~ band)

-- 
*Manuel Spínola, Ph.D.*
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
mspinola using una.cr <mspinola using una.ac.cr>
mspinola10 using gmail.com
Teléfono: (506) 8706 - 4662
Personal website: Lobito de río <https://sites.google.com/site/lobitoderio/>
Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list