Description Usage Arguments Author(s) Examples
Plotting methods for imported shapefiles.
1 2 3 4 |
x |
a gshp object |
covariate |
name of covariate to use for colouring |
contour |
if |
... |
additional arguments to be passed to the underlying plotting method (see Details) |
Darren Kidney darrenkidney@googlemail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ## Not run:
data(N.annamensis)
# plot methods -----------------------------------------------------------------
plot(N.annamensis.region, col = "grey")
plot(N.annamensis.habitat, covariate = "habitat", col = c("darkgreen", "lightgreen"))
plot(N.annamensis.region, add = TRUE)
# ggplot methods ---------------------------------------------------------------
library(ggplot2)
ggplot() + coord_fixed() +
geom_shp(N.annamensis.region)
ggplot() + coord_fixed() +
geom_shp(N.annamensis.habitat, covariate = "habitat") +
scale_fill_manual(values = c("darkgreen", "lightgreen"))
ggplot() + coord_fixed() +
geom_shp(N.annamensis.habitat, covariate = "habitat") +
geom_shp(N.annamensis.region) +
scale_fill_manual(values = c("darkgreen", "lightgreen"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.