Description Usage Arguments Value Examples
View source: R/Compare_ggplots.R
Compare two ggplot objects
1 | compare_ggplots(plot1, plot2, useTempFiles = TRUE)
|
plot1 |
First ggplot object to compare. |
plot2 |
Second ggplot object to compare. |
useTempFiles |
Whether or not to use temporary files in the comparison. Using temp files is faster, but some may wish to compare purely in memory. |
A boolean scalar showing whether the two plots are visually identical or not.
1 2 3 4 5 6 7 | plot1 <- ggplot2::qplot(mpg, wt, data = mtcars, colour = cyl)
plot2 <- ggplot2::qplot(mpg, wt, data = mtcars, colour = cyl)
plot3 <- ggplot2::qplot(mpg, wt, data = mtcars, colour = carb)
compare_ggplots(plot1, plot2)
compare_ggplots(plot1, plot2, useTempFiles = FALSE)
compare_ggplots(plot1, plot3)
compare_ggplots(plot1, plot3, useTempFiles = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.