tests/testthat/test-position-circlepack.R

library(ggplot2)

test_that("position_circlepack works", {
  dat <- data.frame(x = rep(1, 500), y = rep(1, 500), size = rep(1, 500))

  g <- ggplot(dat, aes(x, y, size = size)) +
    geom_point(position = position_circlepack()) +
    coord_cartesian(xlim = c(0, 2), ylim = c(0, 2))

  expect_s3_class(object = g, class = "gg")
})

Try the vayr package in your browser

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

vayr documentation built on April 16, 2025, 1:11 a.m.