Title: | plotting library for mrwater outputs |
---|---|
Description: | The mrwaterplots package plots outputs from mrwater library. |
Authors: | Felicitas Beier [aut, cre], Jens Heinke [aut], Patrick von Jeetze [aut], Jan Philipp Dietrich [aut] |
Maintainer: | Felicitas Beier <[email protected]> |
License: | LGPL-3 | file LICENSE |
Version: | 1.0.18 |
Built: | 2024-12-19 05:39:09 UTC |
Source: | https://github.com/pik-piam/mrwaterplots |
The mrwaterplots package plots outputs from mrwater library.
Maintainer: Felicitas Beier [email protected]
Authors:
Jens Heinke [email protected]
Patrick von Jeetze [email protected]
Jan Philipp Dietrich [email protected]
Useful links:
download Natural Earth shape files
downloadNaturalEarth()
downloadNaturalEarth()
Felicitas Beier
## Not run: a <- downloadSource("NaturalEarth") ## End(Not run)
## Not run: a <- downloadSource("NaturalEarth") ## End(Not run)
This function plots a raster object of halfdegree resolution (with 67420 grid cells) and saves it as PDF
plotBivariateMap( x, y, xlab = NULL, ylab = NULL, breaks = 4, projection = "+proj=eqearth +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", bivariatelegendstyle = 1, colNA = "#d9d9d9", outputfolder = ".\\", name = "name", title = "", ylim = c(-6500000, 8300000), xlim = c(-12577316, 15581284), outputtype = "png" )
plotBivariateMap( x, y, xlab = NULL, ylab = NULL, breaks = 4, projection = "+proj=eqearth +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", bivariatelegendstyle = 1, colNA = "#d9d9d9", outputfolder = ".\\", name = "name", title = "", ylim = c(-6500000, 8300000), xlim = c(-12577316, 15581284), outputtype = "png" )
x |
First MAgPIE object in grid-cellular (67420) resolution to be plotted |
y |
Second MAgPIE object in grid-cellular (67420) resolution to be plotted in same map |
xlab |
name of first object for legend x label |
ylab |
name of second object of legend y label |
breaks |
Breaks in bivariate legend |
projection |
Choose projection. Currently available options: "+proj=eqearth +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" for EqualEarth projection; "+proj=robin +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" for RobinsonProj; and "+proj=longlat +datum=WGS84" for LatLon projection |
bivariatelegendstyle |
number between 1-9 to choose pre-defined bivariate legend colors |
colNA |
color for NAs (default: "#d9d9d9" (gray)) |
outputfolder |
Path to which plot should be saved |
name |
Title of plot (default: "name") |
title |
Plot title displayed in the plot |
ylim |
y-axis limits of plot (default: c(-6500000, 8300000)) |
xlim |
x-axis limits of plot (default: c(-12577316, 15581284)) |
outputtype |
Output type: pdf or jpeg |
map as pdf
Felicitas Beier
This function plots a raster object of halfdegree resolution (with 67420 grid cells) and saves it as PDF
plotMap( x, projection = "+proj=eqearth +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", outputfolder = ".\\", name = "name", title = "", ylim = c(-6500000, 8300000), xlim = c(-12577316, 15581284), legendcolor = c("#7f0000", "#b30000", "#d7301f", "#ef6548", "#fc8d59", "#fdbb84", "#fdd49e", "#fee8c8", "#fff7ec", "#045a8d"), colNA = "#d9d9d9", legendlimit = c(0, 1), legendbreaks = seq(0, 1, 0.1), legendname = "legendname", outputtype = "png", minVal = NULL, maxVal = NULL )
plotMap( x, projection = "+proj=eqearth +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", outputfolder = ".\\", name = "name", title = "", ylim = c(-6500000, 8300000), xlim = c(-12577316, 15581284), legendcolor = c("#7f0000", "#b30000", "#d7301f", "#ef6548", "#fc8d59", "#fdbb84", "#fdd49e", "#fee8c8", "#fff7ec", "#045a8d"), colNA = "#d9d9d9", legendlimit = c(0, 1), legendbreaks = seq(0, 1, 0.1), legendname = "legendname", outputtype = "png", minVal = NULL, maxVal = NULL )
x |
MAgPIE object in grid-cellular (67420) resolution to be plotted |
projection |
Choose projection. Currently available options: "+proj=eqearth +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" for EqualEarth projection; "+proj=robin +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" for RobinsonProj; and "+proj=longlat +datum=WGS84" for LatLon projection |
outputfolder |
Path to which plot should be saved |
name |
Title of plot (default: "name") |
title |
Plot title displayed in the plot |
ylim |
y-axis limits of plot (default: c(-6500000, 8300000)) |
xlim |
x-axis limits of plot (default: c(-12577316, 15581284)) |
legendcolor |
vector of colors |
colNA |
color for NAs (default: "#d9d9d9" (gray)) |
legendlimit |
vector with min and max of legend (default: c(0, 1)) |
legendbreaks |
vector of legend breaks (default: seq(0, 1, 0.1)) |
legendname |
legend name as character (default: "legendname") |
outputtype |
Output type: pdf or jpeg |
minVal |
minimum value at which x should be chopped |
maxVal |
maximum value at which x should be chopped |
map as pdf, jpg or png
Felicitas Beier, Jens Heinke
This function plots a raster object of halfdegree resolution (with 67420 grid cells) and saves it as PDF
plotMapDiscrete( x, projection = "+proj=eqearth +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", outputfolder = ".\\", name = "name", title = "", ylim = c(-6500000, 8300000), xlim = c(-12577316, 15581284), legendcolor = c("#7f0000", "#b30000", "#d7301f", "#ef6548", "#fc8d59", "#fdbb84", "#fdd49e", "#fee8c8", "#fff7ec", "#045a8d"), colNA = "#d9d9d9", legendbreaks = seq(0, 1, 0.1), legend = NULL, legendname = "legendname", outputtype = "png", minVal = NULL, maxVal = NULL )
plotMapDiscrete( x, projection = "+proj=eqearth +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", outputfolder = ".\\", name = "name", title = "", ylim = c(-6500000, 8300000), xlim = c(-12577316, 15581284), legendcolor = c("#7f0000", "#b30000", "#d7301f", "#ef6548", "#fc8d59", "#fdbb84", "#fdd49e", "#fee8c8", "#fff7ec", "#045a8d"), colNA = "#d9d9d9", legendbreaks = seq(0, 1, 0.1), legend = NULL, legendname = "legendname", outputtype = "png", minVal = NULL, maxVal = NULL )
x |
MAgPIE object in grid-cellular (67420) resolution to be plotted |
projection |
Choose projection. Currently available options: "+proj=eqearth +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" for EqualEarth projection; "+proj=robin +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" for RobinsonProj; and "+proj=longlat +datum=WGS84" for LatLon projection |
outputfolder |
Path to which plot should be saved |
name |
Title of plot (default: "name") |
title |
Plot title displayed in the plot |
ylim |
y-axis limits of plot (default: c(-6500000, 8300000)) |
xlim |
x-axis limits of plot (default: c(-12577316, 15581284)) |
legendcolor |
vector of colors |
colNA |
color for NAs (default: "#d9d9d9" (gray)) |
legendbreaks |
vector of legend breaks (default: seq(0, 1, 0.1)) |
legend |
legend element names (if non-numeric characters shall be returned). (default: NULL, then legendbreaks defines displayed legend elements) |
legendname |
legend name as character (default: "legendname") |
outputtype |
Output type: pdf or jpeg |
minVal |
minimum value at which x should be chopped |
maxVal |
maximum value at which x should be chopped |
map as pdf, jpg or png
Felicitas Beier, Jens Heinke
This function sets up the land mask and country polygons to plot magpie objects using raster/terra with an Equal Earth Projection
toolPrepareLandMask( projection = "+proj=eqearth +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" )
toolPrepareLandMask( projection = "+proj=eqearth +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" )
projection |
Choose projection. Currently available options: "+proj=eqearth +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" for EqualEarth projection; "+proj=robin +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" for RobinsonProj; and "+proj=longlat +datum=WGS84" for LatLon projection |
list of raster files
Felicitas Beier, Jens Heinke, Patrick v. Jeetze, Jan P. Dietrich
This function transforms a cellular magpie object with 67420 grid cells to a raster object that can be plotted in the chosen projection
toolRasterTransform( x, projection = "+proj=eqearth +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" )
toolRasterTransform( x, projection = "+proj=eqearth +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" )
x |
MAgPIE object in grid-cellular (67420) resolution to be transformed to raster |
projection |
Choose projection. Currently available options: "+proj=eqearth +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" for EqualEarth projection; "+proj=robin +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" for RobinsonProj; "+proj=moll" for Mollweide; and "+proj=longlat +datum=WGS84" for LatLon projection |
magpie object in cellular resolution
Felicitas Beier