Learn R Programming

rosetta (version 0.3.12)

ggScatterPlot: Bar chart using ggplot

Description

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

Usage

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

Value

A ggplot2::ggplot() plot is returned.

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().

See Also

Examples

Run this code
rosetta::ggScatterPlot(mtcars$hp, mtcars$mpg);

Run the code above in your browser using DataLab