This function provides a simple interface to create a ggplot2::ggplot() bar chart.

ggScatterPlot(
  x,
  y,
  jitter = TRUE,
  size = 3,
  alpha = 0.66,
  shape = 16,
  color = "black",
  fill = "black",
  stroke = 1,
  plotTheme = ggplot2::theme_bw(),
  ...
)

Arguments

x, y

The vectors to display in the scatter plot. Alternatively, x can be a data frame; then y has to be a vector with (numeric or character) indices, e.g. column names.

jitter

Whether to jitter the points (TRUE by default).

size, alpha, shape, color, fill, stroke

Quick way to set the aesthetics.

plotTheme

The theme to apply.

...

And additional arguments are passed to ggplot2::geom_point().

Value

A ggplot2::ggplot() plot is returned.

Examples

rosetta::ggScatterPlot(mtcars$hp, mtcars$mpg);