Learn R Programming

foreSIGHT (version 0.9.81)

plotLayers: plotLayers

Description

Superimposes climate projection information on to the 2D system performance spaces generated using performanceSpaces

Usage

plotLayers(plot = NULL,
             plotArgs = NULL,
             climdata = NULL,
             climArgs = list(),
             simDirectory = "Simulation1",
             IOmode="suppress"
                  )

Arguments

plot

A, editable plot output from performanceSpaces. The editable plot can be accessed via plot$plotEdit.

plotArgs

A list controlling how the performance space is visualised with the following components:

title

a string that is used as the title label.

legendtitle

a string that is used to label the legend.

xlim

x axis limits.

ylim

y axis limits.

performancelimits

z axis limits.

lowfill

a string specifying the colour for lower values of performance. Default is 'red". For use with plotTag="Heat".

highfill

a string specificying the colour for the high values of performance. Default is "yellow". A colour ramp will be created between this and the lowfill. For use with plotTag="Heat".

contour

a TRUE/FALSE toggle for whether or not contour lines are overlaid. Default is TRUE. For use with plotTag="Heat".

contourlevels

a vector specifying the levels at which controus will be drawn. For use with plotTag = "Contours".

climdata

a data frame of the projected climate data

climArgs

a list that controls the appearance of the superimposed climate projections with the following components:

colour

a string that is used to set the colour of the superimposed climate drojections. Defaults to black.

fill

a string that is used to determine whether the system performance resulting from the climate projections should also be displayed. Set to "performance" to infill climate projections according to their system performance.

simDirectory

A string used to label the output directory.

IOmode

A string that specifies the input-output mode for the scenarios = "verbose", "dev" or "suppress".

Value

climate projection information superimposed on a 2D system performance spaces plot.

See Also

See Also: scenarioGenerator, performanceSpaces and quickSpace

Examples

Run this code
# NOT RUN {
data(tankPlot)
data(climdata2030)          #loading climate data for 2030 time slice

###Example 1
# Saved from a previous example
# tank_simpleScale_plot<-performanceSpaces(data=tank_simple_scenarios,
#                                          plotTag = "Heat",
#                                          plotArgs=plotArgs,
#                                          systemModel = tankWrapper,
#                                          systemArgs = systemArgs)

#Create plotting arguments
plotArgs<-list(title="Scenario neutral space with projections overlaid",
               ylim=c(0.7,1.3),
               xlim=c(-2,2),
               xtitle="Temp_ann_avg_m",
               ytitle="P_ann_tot_m")

climArgs<-list(performancelimits=NULL,
               label=NULL,
               slice=2030,
               colour="black",
               fill="performance")

#Plot performance space with projections overlaid
tank_overlay_plot=plotLayers(plot=tank_simpleScale_plot$plotEdit,
                             plotArgs=plotArgs,
                             climdata=climdata,
                             climArgs=climArgs)
tank_overlay_plot
# }

Run the code above in your browser using DataLab