tests/testthat/test-ggplot-summary.R

test_that("stat_summary works", {
  p <- ggplot(iris, aes(x = Species, y = Sepal.Length)) +
    stat_summary(fun = mean, fun.max = max, fun.min = min) +
    stat_summary(fun = median, geom = "crossbar", linetype = "dashed")

  expect_doppelganger_built(p, "stat-summary") 
})
ropensci/plotly documentation built on April 30, 2024, 11:59 a.m.