ggExtra (version 0.10.1)

ggMarginalGadget: ggMarginal gadget

Description

This gadget and addin allow you to select a ggplot2 plot and interactively use ggMarginal to build marginal plots on top of your scatterplot.

Usage

ggMarginalGadget(plot)

Value

An object of class ggExtraPlot. This object can be printed to show the marginal plots or saved using any of the typical image-saving functions

Arguments

plot

A ggplot2 scatterplot

Examples

Run this code
if (interactive()) {
  plot <- ggplot2::ggplot(mtcars, ggplot2::aes(wt, mpg)) + ggplot2::geom_point()
  plot2 <- ggMarginalGadget(plot)
}

Run the code above in your browser using DataLab