border: Set ggplot Panel Border Line

Description Usage Arguments Examples

View source: R/border.R

Description

Change or set ggplot panel border.

Usage

1
border(color = "black", size = 0.8, linetype = NULL)

Arguments

color

border line color.

size

numeric value specifying border line size.

linetype

line type. An integer (0:8), a name (blank, solid, dashed, dotted, dotdash, longdash, twodash). Sess show_line_types.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Load data
data("ToothGrowth")
df <- ToothGrowth

# Basic plot
p <- ggboxplot(df, x = "dose", y = "len")
p

# Add border
p + border()

Example output

Loading required package: ggplot2
Loading required package: magrittr

ggpubr documentation built on July 2, 2020, 2:12 a.m.