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
  )
})
ropenscilabs/gghdr documentation built on March 23, 2022, 11:21 p.m.