gginput | R Documentation |
Converts a MAgPIE object into a dataframe usable for ggplot
gginput(data, scatter=NULL, mappings=NULL, na.rm=FALSE, verbose=TRUE)
data |
MAgPIE object which provides the data for ggplot |
scatter |
In the case you want to make a scatterplot you have to specify here which data dimension of the MAgPIE object should be used for the scatter plot (name of the dimension) |
mappings |
A list of mappings used to create combinations of columns which then can be used for aesthetics in ggplot |
na.rm |
Boolean which decides whether NA values should be removed from the data. |
verbose |
Boolean which decides whether info messages should be printed to screen or not. |
Dataframe usable for ggplot
Jan Philipp Dietrich
## Not run:
library(ggplot2)
data(population_magpie)
ggplot(gginput(population_magpie,scatter="scenario"),aes(x=.value.A2,y=.value.B1,color=i))
+ geom_point() + geom_smooth(method="loess") + facet_wrap(~.spat1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.