Learn R Programming

aelab (version 1.1.0)

plot_point: plot_point

Description

Create a scatter plot using the aelab theme.

Usage

plot_point(
  df,
  x,
  y,
  z = NULL,
  base_size = 25,
  point_size = 3,
  stroke_size = 1,
  text_color = "black",
  facet = FALSE,
  facet_x = NULL,
  facet_y = NULL,
  style = "bw"
)

Value

A ggplot object.

Arguments

df

A data frame.

x

<[`data-masking`][ggplot2::aes]> Column mapped to the x-axis.

y

<[`data-masking`][ggplot2::aes]> Column mapped to the y-axis.

z

<[`data-masking`][ggplot2::aes]> Optional column mapped to fill colour.

base_size

Base font size passed to the ggplot2 theme. Default 25.

point_size

Point size. Default 3.

stroke_size

Point stroke width. Default 1.

text_color

Text colour. Default "black".

facet

Logical; add facet grid? Default FALSE.

facet_x

Column name (string) for the horizontal facet dimension.

facet_y

Column name (string) for the vertical facet dimension.

style

Theme style. One of "bw", "minimal", "classic", "graycolor", "light". Default "bw".

Examples

Run this code
if (FALSE) {
df <- data.frame(x = 1:5, y = c(2,4,1,5,3), g = c("A","A","B","B","A"))
plot_point(df, x, y, g)
}

Run the code above in your browser using DataLab