scatter_plot: scatter plot

View source: R/scatter_plot.R

scatter_plotR Documentation

scatter plot

Description

create a scatter plot

Usage

scatter_plot(
  data,
  x,
  y,
  group = NULL,
  palette = ez_col,
  size = 11,
  point_size = 2.5,
  smooth = FALSE,
  env = parent.frame()
)

Arguments

data

A data.frame.

x

A named character value. Evaluates to a column.

y

A named character value. Evaluates to a column.

group

A character value. Evaluates to a column.

palette

Colour function.

size

theme size for use_theme(). Default is 14.

point_size

Numeric. Default is 2.

smooth

logical. If TRUE, adds geom_smooth().

env

environment for evaluating expressions.

Examples

scatter_plot(mtcars, "wt", "hp")
scatter_plot(mtcars, "wt", "hp", "factor(cyl)")
scatter_plot(mtcars, "factor(cyl)", "hp")

wkostelecki/ezplot documentation built on Feb. 1, 2024, 10:58 p.m.