plotmap2 | R Documentation |
Plots maps MAgPIE objects
plotmap2(data,file=NULL,title="World map",legend_range=NULL,
legendname="Cell share",lowcol="grey95",midcol="orange",
highcol="darkred",midpoint=0.5, facet_grid="Year~Data1", nrow=NULL, ncol=NULL,
scale=2,breaks=TRUE,labs=TRUE,borders=TRUE,MAgPIE_regions=FALSE,
axis_text_col="black",legend_discrete=FALSE,legend_breaks=NULL,
show_percent=FALSE, sea=TRUE,land_colour="white",
legend_height=2,legend_width=NULL,text_size=12,
legend_position="right",facet_style="default",plot_height=10,plot_width=20)
data |
MAgPIE object |
file |
File name the output should be written to using ggsave |
title |
Title of the map |
legend_range |
Legend range. Vector with minimum and maximum. |
legendname |
Name of the legend |
lowcol |
color for low values |
midcol |
color for medium values |
highcol |
color for high values |
midpoint |
Value indicating where the transformation from lowcol to highcol takes place. |
facet_grid |
facets formula used in ggplot2 with default "Year~Data1". Falls back to facet_wrap for "Data1". |
nrow |
number rows for facet_wrap |
ncol |
number columns for facet_wrap |
scale |
scaling of ggplot2 object before saving to file |
breaks |
TRUE or FALSE |
labs |
TRUE or FALSE |
borders |
TRUE or FALSE |
MAgPIE_regions |
TRUE or FALSE, if TRUE data is ignored |
axis_text_col |
color of axis text and ticks; default value: "black" |
legend_discrete |
TRUE or FALSE, discrete or continous legend |
legend_breaks |
NULL (automatically) or vector with breaks |
show_percent |
TRUE or FALSE, percent values for discrete lengeds |
sea |
TRUE or FALSE, blue sea or just white background |
land_colour |
Background colour for all land area. Defaults to white. |
legend_height |
NULL or legend height in cm |
legend_width |
NULL or legend width in cm |
text_size |
text size of axis, legend and title |
legend_position |
right (default), left, top, bottom or none |
facet_style |
style of facets, default or paper |
plot_height |
plot height in cm |
plot_width |
plot width in cm |
Makes use of ggplot2 map plotting capabilites
Florian Humpenoeder, David M Chen
# plotmap2(data)
#' #@importFrom RColorBrewer
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.