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,
  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

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.