Skip to contents

Simple scatterplot

Usage

point(
  df,
  x,
  y,
  group = "",
  facet = "",
  facet_scales = "free",
  x_rm_na = TRUE,
  y_rm_na = TRUE,
  group_rm_na = TRUE,
  facet_rm_na = TRUE,
  add_color = color("cat_5_main_1"),
  add_color_guide = TRUE,
  flip = TRUE,
  alpha = 1,
  size = 2,
  x_title = NULL,
  y_title = NULL,
  group_title = NULL,
  title = NULL,
  subtitle = NULL,
  caption = NULL,
  theme_fun = theme_point(),
  scale_fill_fun = scale_fill_visualizer_discrete(),
  scale_color_fun = scale_color_visualizer_discrete()
)

Arguments

df

A data frame.

x

A quoted numeric column.

y

A quoted numeric column.

group

Some quoted grouping categorical column, e.g. administrative areas or population groups.

facet

Some quoted grouping categorical column.

facet_scales

Character. Either "free" (default) or "fixed" for facet scales.

x_rm_na

Remove NAs in x?

y_rm_na

Remove NAs in y?

group_rm_na

Remove NAs in group?

facet_rm_na

Remove NAs in facet?

add_color

Add a color to points (if no grouping).

add_color_guide

Should a legend be added?

flip

TRUE or FALSE.

alpha

Fill transparency.

size

Point size.

x_title

The x scale title. Default to NULL.

y_title

The y scale title. Default to NULL.

group_title

The group legend title. Default to NULL.

title

Plot title. Default to NULL.

subtitle

Plot subtitle. Default to NULL.

caption

Plot caption. Default to NULL.

theme_fun

Whatever theme. Default to theme_point(). NULL if no theming needed.

scale_fill_fun

Scale fill function. Default to scale_fill_visualizer_discrete().

scale_color_fun

Scale color function. Default to scale_color_visualizer_discrete().