tests/testthat/test-scale_color_colorhex_c.R

test_that("scale_fill_colorhex works as expected", {
  set.seed(123)
  vdiffr::expect_doppelganger(
    title = "scale_fill_colorhex_d works",
    fig = ggplot(iris, aes(x = Species, y = Sepal.Length, fill = Species)) +
      geom_violin() +
      scale_fill_colorhex_d(palette = 1014416)
  )

  set.seed(123)
  vdiffr::expect_doppelganger(
    title = "scale_fill_colorhex_c works",
    fig = ggplot(iris, aes(x = Petal.Length, y = Petal.Width, color = Sepal.Length)) +
      geom_point() +
      scale_color_colorhex_c(palette = 1014416)
  )
})

Try the see package in your browser

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

see documentation built on Nov. 3, 2023, 5:10 p.m.