Render a simple world map of a coordinate-based (cell) magpie object. Each
grid cell is drawn as a colored tile on top of country outlines. Country
outlines require the suggested package maps; if it is not installed,
only the cell tiles are drawn and a message is emitted. If the object
contains more than one year or data name, the remaining dimensions are spread
across facets, so it is usually best to subset the object to the slice(s) of
interest before plotting.
Arguments
- px
The magpie object to be visualized. It must contain spatial coordinates (see
hasCoords).- draw
Logical. If
TRUE(the default), the plot is rendered on the current graphics device. IfFALSE, the ggplot object is returned without drawing, so it can be modified or printed manually later.
See also
Other Display:
head.magpie(),
maxample(),
mplot(),
print.magpie(),
show-methods,
str.magpie()
Examples
if (FALSE) { # \dontrun{
a <- maxample("animal")
mplotMap(a[, 1, 1])
} # }