p_line: Line plot

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

View source: R/p_line.R

Description

Line plot based on htsr time-series. The parameters can be setted by p_line_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
17
18
19
20
21
22
p_line(
  nbst,
  filei,
  serlab,
  title,
  type,
  rnorm,
  rtime,
  start,
  end,
  rfixy,
  y.down,
  y.up,
  pal,
  linet,
  linew,
  rppt = FALSE,
  pointt = NA,
  points = NA,
  smooth,
  fct
)

Arguments

nbst

Number of files to process

filei

List of the file names to process

serlab

List of the time-series labels to process

title

Title of the plot

type

Title of the y axis

rnorm

Normalized values (TRUE / FALSE)

rtime

Reduce the plotting interval (TRUE / FALSE)

start

Start date - "YYYY-MM-DD"

end

End date - "YYYY-MM-DD"

rfixy

Fix the y scale (TRUE / FALSE)

y.down

Min y - value

y.up

Max y - value

pal

List of colors

linet

List of line type

linew

Line size

rppt

Plot the points (TRUE / FALSE)

pointt

List of point type

points

Point size

smooth

Trend fitting (TRUE / FALSE)

fct

Plot facets (TRUE / FALSE)

Details

For a full description of the settings, see p_line_app

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

If fct is TRUE, the plot is presented in facet shape, each facet corresponding to a file.

Value

a ggplot2 object

Author(s)

P. Chevallier - Apr 2015 - Mar 2020

See Also

p_bar for plotting bars and p_line_app 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_line(filei, serlab)

## End(Not run)

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