Wrapper around [ggplot2::geom_point()] that plots pretty scatter plots using a custom ggplot theme.

plot_point(
  data,
  x_str,
  y_str,
  color_str = NULL,
  theme_options = NULL,
  show_plot = FALSE,
  ...
)

Arguments

data

Data frame to use for plot.

x_str

Character string. Name of variable in data to plot on x-axis.

y_str

Character string. Name of variable in data to plot on y-axis.

color_str

Character string (optional). Name of variable in data to use as color aesthetic in plot.

theme_options

(Optional) list of arguments to pass to vthemes::theme_vmodern().

show_plot

Logical. Should this plot be printed? Default FALSE.

...

Other arguments to pass to [ggplot2::geom_point()].

Value

A ggplot scatter plot.

See also

Other pretty_ggplot_wrappers: plot_bar(), plot_boxplot(), plot_density(), plot_histogram(), plot_line()

Examples

plot_point(iris, x_str = "Sepal.Width", y_str = "Sepal.Length")

plot_point(iris, x_str = "Sepal.Width", y_str = "Sepal.Length",
            color_str = "Species")