lineplot_ci: Line plot with confidence interval

Description Usage Arguments Examples

View source: R/lineplot_ci.R

Description

Draws lines withs with confidence intervals

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
lineplot_ci(
  x,
  y,
  y_lb,
  y_ub,
  data = NULL,
  add = FALSE,
  line_col = "darkblue",
  ci_col = "gray80",
  type = "l",
  xlim = NULL,
  ylim = NULL,
  log = "",
  xlab = NULL,
  ylab = NULL,
  ann = par("ann"),
  axes = TRUE,
  frame.plot = axes,
  panel.first = grid(),
  panel.last = NULL,
  asp = NA,
  ...
)

Arguments

x, y, y_lb, y_ub

Column name or column number for the respective data

data

data.frame with plotting data

add

TRUE/FALSE. TRUE adds the plot the previous plot, FALSE generates a new plot.

line_col

Color of line. Default is "darkblue".

ci_col

Color of confidence interval. Default is "gray80".

...

Other plotting parameters sent to plot.

Examples

1
2
3
4
5
6
7
8
ed <- data.frame(
    x = -10:10
  , y = (-10:10)^2
  , y_lb = (-10:10)^2 - 10
  , y_ub = (-10:10)^2 + 10
  , stringsAsFactors = FALSE)
plotstyle(style = upright)
lineplot_ci(x = 1, y = 2, y_lb = 3, y_ub = 4, data = ed)

thomasgstewart/tgsify documentation built on June 18, 2020, 11:10 a.m.