Learn R Programming

vpc (version 1.2.4)

new_vpc_theme: Create a customized VPC theme

Description

Create a customized VPC theme

Usage

new_vpc_theme(update = NULL)

Value

A list with vpc theme specifiers

Arguments

update

list containing the plot elements to be updated. Run `new_vpc_theme()` with no arguments to show an overview of available plot elements.

Details

This function creates a theme that customizes how the VPC looks, i.e. colors, fills, transparencies, linetypes, sizes, etc. The following arguments can be specified in the input list:

obs_color

color for observations points

obs_size

size for observation points

obs_median_color

color for median observation line

obs_median_linetype

linetype for median observation line

obs_median_linewidth

linewidth for median observation line

obs_ci_fill

color for observation CI fill

obs_ci_color

color for observation CI lines

obs_ci_linetype

linetype for observation CI lines

obs_ci_linewidth

linewidth for observations CI lines

sim_pi_fill

fill color for simulated prediction interval areas

sim_pi_alpha

transparency for simulated prediction interval areas

sim_pi_color

color for simulated prediction interval lines

sim_pi_linetype

linetype for simulated prediction interval lines

sim_pi_linewidth

linewidth for simulated prediction interval lines

sim_median_fill

fill color for simulated median area

sim_median_alpha

transparency for simulated median area

sim_median_color

color for simulated median line

sim_median_linetype

linetype for simulated median line

sim_median_linewidth

linewidth for simulated median line

bin_separators_color

color for bin separator lines, NA for don't plot

bin_separators_location

where to plot bin separators ("t" for top, "b" for bottom)

loq_color

color of line showing limit of quantification

Examples

Run this code
theme1 <- new_vpc_theme(update = list(
  obs_color = "red",
  obs_ci_color = "#aa0000",
  obs_alpha = .3,
  sim_pi_fill = "#cc8833",
  sim_pi_linewidth = 2
))
vpc(simple_data$sim, simple_data$obs, vpc_theme = theme1)

Run the code above in your browser using DataLab