getPreciBar_comb: Combine bars together

View source: R/getPreciBar(generic).R

getPreciBar_combR Documentation

Combine bars together

Description

Combine bars together

Usage

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.

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.

2. 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.

Value

A combined barplot.

References

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

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/


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