Description Usage Arguments Value Author(s) See Also Examples
Function to create a time series plot from magpie objects.
1 2 3 4 5 |
magpie |
A magpie object to be plotted or a named list of magpie objects. Only one data column allowed. |
historical |
A magpie object with historical data or a named list of such magpie objects. Either one data column or three with naming c("data","up","lo") for uncertainty specification. |
projection |
A magpie object with projection data or a named list of such magpie objects. Either one data column or three with naming c("data","up","lo") for uncertainty specification. |
years |
A vector specifying the first and last year displayed. Has to be provided as integer years, eg: years=c(1980,2045). For one sided limits, set the other one to NA, e.g. c(NA,2065) or c(1960,NA). |
xlim |
Similar to the years argument. For back compatibility only. |
ylim |
A vector specifying limits for the y axis. |
index |
Y axis diesplays absolute values (FALSE) or index wrt to model output in the first simulation year (TRUE) |
same_yscale |
If level=="reg", should all regions have the same y axis (TRUE) or individual ones (FALSE). |
text_size |
Size of the text in the plot |
title |
Title of the plot |
ylab |
Y label |
legend_names |
A vector of length three. Determines the legend titles for Model output, Historical data and Other projections. |
raw_plot |
If FALSE, the complete plot is returned. If TRUE, a list with the actual plot, the legend and the function to combine both is returned. See Value |
raw_legend |
Works only with |
If raw_plot is FALSE, the plot is returned as a full object. No easy manipulations are possible. If raw_plot is TRUE, a list of three objects is returned. The first element is the actual plot and can be modified in a normal way using ggplot2 routines. The second element contains the legend. The third element contains the function to combine both to the plot that is returned if raw_plot=FALSE. If raw_legend is TRUE, the legend element of the returned list contains the individual legend components, the widths for arranging and a function to combine the legends.
Markus Bonsch
addData
,getData
,validationPlot
,addMapping
1 2 3 4 5 6 7 8 9 10 11 12 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.