p_bar: Bar plot

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/p_bar.R

Description

Bar plot based on htsr time-series. The parameters can be set by p_bar_app. For a step by step operation the function ps_plothts is more convenient.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
p_bar(
  nbst,
  filei,
  serlab,
  title,
  type,
  rnorm,
  rtime,
  start,
  end,
  rfixy,
  y.down = NA,
  y.up = NA,
  pal,
  fct
)

Arguments

nbst

Number of files to process

filei

List of the file names to process

serlab

List of the series labels to process

title

Title of the plot - default : "Title"

type

Title of the y axis - default : "Y axis"

rnorm

Normalized values - TRUE/FALSE(default)

rtime

Reduce the plotting interval - TRUE/FALSE(default)

start

Start date - "YYYY-MM-DD" or NA (default)

end

End date - "YYYY-MM-DD" or NA(default)

rfixy

Fix the y scale - TRUE/FALSE(default)

y.down

Min y - value or NA(default)

y.up

Max y - value or NA(default)

pal

List of colors

fct

Plot facets (TRUE / FALSE)

Details

For a full description of the settings, see p_bar_app

If the number of files existing in the setting file is higher than the number of processed series nbst, only the nbst first files are processed.

Value

a ggplot2 object

Author(s)

P. Chevallier - Apr 2015 - Mar 2020

See Also

p_line for plotting lines and/or points and p_line for setting the plot parameters

Examples

1
2
3
4
5
6
7
## Not run: 

filei <- c("foo1.xlsx","foo2.xlsx")
serlab <- c("station1", "station2")
p_bar(filei, serlab)

## End(Not run)

htsr documentation built on Jan. 3, 2022, 5:10 p.m.