Scatter plot function

scatt(
  df,
  x,
  y,
  xs = defx(),
  ys = defy(),
  title = NULL,
  group = NULL,
  col = NULL,
  plot_id = FALSE,
  size = pm_opts$scatter.size,
  alpha = pm_opts$scatter.alpha,
  scale_col = scale_color_brewer(palette = "Set2", name = ""),
  ...
)

Arguments

df

Data frame to plot.

x

Character name for x-axis data.

y

Character name for y-axis data.

xs

See defx().

ys

See defy().

title

Character, passed to ggplot2::ggtitle().

group

Character name of grouping variable.

col

Character name of variable to color the points.

plot_id

If TRUE then subject IDs are plotted rather than points; see the size argument - the size may need to be increased when plotting IDs.

size

Passed to ggplot2::geom_point() or ggplot2::geom_text().

alpha

Passed to ggplot2::geom_point().

scale_col

Discrete scale to use for coloring the points (see default).

...

Not used.

Value

A single plot.

Details

Since this function creates a scatter plot, both the x and y columns must be numeric.