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") 
})

Try the plotly package in your browser

Any scripts or data that you put into this service are public.

plotly documentation built on May 29, 2024, 2:23 a.m.