getSpatialMap_comb: Combine maps together

View source: R/getSpatialMap.R

getSpatialMap_combR Documentation

Combine maps together

Description

Combine maps together

Usage

getSpatialMap_comb(
  ...,
  list = NULL,
  nrow = 1,
  x = "",
  y = "",
  title = "",
  output = FALSE
)

Arguments

...

different maps generated by getSpatialMap(, output = 'ggplot'), see details.

list

If input is a list containing different ggplot data, use list = inputlist.

nrow

A number showing the number of rows.

x

A string of x axis name.

y

A string of y axis name.

title

A string of the title.

output

A boolean, if chosen TRUE, the output will be given.

Details

For getSpatialMap_comb, the maps to be compared should be with same size and resolution, in other words, they should be fully overlapped by each other.

If they have different resolutions, use interpGridData{ecomsUDG.Raccess} to interpolate.

Value

A combined map.

References

  • H. Wickham. ggplot2: elegant graphics for data analysis. Springer New York, 2009.

Examples



## Not run: 
data(tgridData)# the result of \code{\link{loadNcdf}}
#The output should be 'ggplot'
a1 <- getSpatialMap(tgridData, method = 'summer', output = 'ggplot', name = 'a1')
a2 <- getSpatialMap(tgridData, method = 'winter', output = 'ggplot', name = 'a2')
a3 <- getSpatialMap(tgridData, method = 'mean', output = 'ggplot', name = 'a3')
a4 <- getSpatialMap(tgridData, method = 'max', output = 'ggplot', name = 'a4')
getSpatialMap_comb(a1, a2)

# or you can put them into a list.
getSpatialMap_comb(list = list(a1, a2), nrow = 2)

## End(Not run)



# More examples can be found in the user manual on https://yuanchao-xu.github.io/hyfo/


hyfo documentation built on Aug. 16, 2023, 5:08 p.m.