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 Oct. 22, 2023, 1:14 a.m.