Skip to content
Back to formatted view

Raw Message

Message-ID: <CAMLL7bkJ4-kfF+bNHDVqSNg19066Qktcd+VoE46SK6h+d8YjDQ@mail.gmail.com>
Date: 2015-05-23T15:28:40Z
From: Oscar PerpiƱan
Subject: grid.text with rasterVis::layerplot
In-Reply-To: <555FAE73.4020306@gmail.com>

Hi,

It is easier with the panel.number function. Following the example proposed
by Tim:

library(rasterVis)

f <- system.file("external/test.grd", package="raster")
r <- raster(f)
s <- stack(r, r+500, r-500)

labs <- c("a.", "b.", "c.")

levelplot(s) + layer(grid.text(labs[panel.number()], .95, .1))

Best,

Oscar.

-----------------------------------------------------------------
Oscar Perpi??n Lamigueiro
Dpto. Ing. El?ctrica, Electr?nica, Autom?tica y F?sica Aplicada (ETSIDI-UPM)
Grupo de Sistemas Fotovoltaicos (IES-UPM)
URL: http://oscarperpinan.github.io

	[[alternative HTML version deleted]]