Skip to contents

Convert ggplot to tidyplot

Usage

as_tidyplot(gg, width = 50, height = 50, dodge_width = 0.8)

Arguments

gg

A ggplot.

width

Width of the plot area. Defaults to 50.

height

Height of the plot area. Defaults to 50.

dodge_width

For adjusting the distance between grouped objects. Defaults to 0.8.

Value

A tidyplot object.

Examples

gg <-
  study %>%
  ggplot2::ggplot(ggplot2::aes(x = treatment, y = score, color = treatment)) +
  ggplot2::geom_point()

gg


gg %>% as_tidyplot()