Skip to content
Prev 18392 / 29559 Next

gplot error in rasterVis

Hi,

With the current definition of gplot you have to add the layers you need
to plot (that's why you get the error "No layers to plot"). Take a look
at the example of the help page. With your example:

gplot(r) + geom_tile(aes(fill=value)) + coord_equal()

On the other hand, the warning when you use gplot is because both
latticeExtra and ggplot2 define the function layer. If ggplot2 is loaded
after rasterVis, the layer definition from latticeExtra becomes
masked. If you plan to use latticeExtra (for example, to add layers over
the result of a levelplot call) you should load ggplot2 before
rasterVis.

Best,

Oscar.

Natalie Wagenbrenner <nwagenbrenner at gmail.com> writes: