Skip to content
Prev 14843 / 29559 Next

Storing Multiple spplots in List

Please make a small reproducible example.
There is no way anyone can figure out the problem with what you have
supplied.

What is telling you they are blank?
Do your spplot() commands produce a plot when executed outside the
function?

This works for me:

tmp <- list()
length(tmp) <- 2

## I used the first example in ?spplot to do this:
tmp[[1]] <-  spplot(  ## args )
tmp[[2]] <-  spplot(  ## args )

## then I get plots from any of these:
lapply(tmp, print)

## or
print( tmp[[1]])

## or even,
print(tmp)