ggMarginalGadget

0th

Percentile

ggMarginal gadget

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)
Arguments
plot

A ggplot2 scatterplot

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

Note

To use the RStudio addin, highlight the code for a plot in RStudio and select ggplot2 Marginal Plots from the RStudio Addins menu. This will embed the marginal plots code into your script. Alternatively, you can call ggMarginalGadget() with a ggplot2 plot, and the gadget will return a plot object.

Aliases
  • ggMarginalGadget
Examples
# NOT RUN {
if (interactive()) {
  plot <- ggplot2::ggplot(mtcars, ggplot2::aes(wt, mpg)) + ggplot2::geom_point()
  plot2 <- ggMarginalGadget(plot)
}
# }
Documentation reproduced from package ggExtra, version 0.9, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.