tests/testthat/test-theme.R

test_that("theme_pl", {
  vdiffr::expect_doppelganger(
    title = "theme_pl",
    fig = {
      ggplot(mini_diamond, aes(x = x, y = y, color = clarity)) +
        geom_point(size = 2) +
        facet_grid(. ~ cut) +
        labs(title = "title", tag = "tag", caption = "caption") +
        theme_pl()
    }, writer = pl_svg
  )
})

Try the plutor package in your browser

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

plutor documentation built on Oct. 27, 2023, 9:07 a.m.