tests/testthat/test-polarcoords.R

library(ggplot2)

pie <- ggplot(mtcars, aes(x = factor(1), fill = factor(cyl))) +
  geom_bar(width = 1) +
  coord_polar(theta = "y")

test_that("polar coordinates throws an error", {
  expect_error(ggannotate(pie))
})
MattCowgill/ggannotate documentation built on Oct. 9, 2021, 11:03 p.m.