getSpatialMap_comb function

Combine maps together

Combine maps together

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.

Returns

A combined map.

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.

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/

References

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

Other functions in hyfo

Related functions from the same R package

  • Maintainer: Yuanchao Xu
  • License: GPL-2
  • Last published: 2023-08-16