tests/testthat/test-geom-hdr-rug.R

library(ggplot2)

set.seed(5)
test_that("hdr rug plot draws correctly", {
  hdr_rugplot <- ggplot(faithful, aes(x = eruptions)) +
    geom_hdr_rug() +
    theme_bw()

  vdiffr::expect_doppelganger(
    "hdr rugplot",
    hdr_rugplot
  )
})

Try the gghdr package in your browser

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

gghdr documentation built on Oct. 29, 2022, 1:16 a.m.