getPreciBar_comb function

Combine bars together

Combine bars together

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

Arguments

  • ...: different barplots generated by getPreciBar(, output = 'ggplot'), refer to details.
  • list: If input is a list containing different ggplot data, use llist = inputlist. NOTE: yOU HAVE TO PUT A list =, before your list.
  • 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 barplot.

Details

..., representing different ouput generated by getPreciBar(, output = 'ggplot'), they have to be of the same type, e.g., 1. Jan precipitation of different years, Feb precipitation of different years, and... They are both monthly precipitation, and they share x axis.

  1. Mean monthly precipitation of different dataset. e.g., long term mean monthly precipitation and short term mean monthly precipitation. They are both mean monthly precipitation.

Examples

data(tgridData)# the result of \code{\link{loadNcdf}} #output type of getPreciBar() has to be 'ggplot'. b1 <- getPreciBar(tgridData, method = 2, output = 'ggplot', name = 'b1') b2 <- getPreciBar(tgridData, method = 3, output = 'ggplot', name = 'b2') getPreciBar_comb(b1, b2) # 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