Closed yutannihilation closed 3 years ago
I too have the same error. I've created a function designed to modify a ggplot2 object:
modify_points = function(p, shape=19, colour="black", size=1.5) {
c = ggplot2::ggplot_build(p)
# make modifications
c$data[[1]]$size = size
c$data[[1]]$colour = colour
c$data[[1]]$shape = shape
c = ggplot2::ggplot_gtable(c)
# return plot
plot(c)
}
Like, @yutannihilation, also get the same error ("svglite only supports one page").
Seems to be fixed by #106.
I found, while there's no error if I run the whole tests on ggplot2, running
tests/testthat/test-guides.R
solely fails withsvglite only supports one page
error. This seems somehow related to gtable or grid, but I'm not sure what's happening. Forgive me to file this issue with a not-so-minimal reprex so that I (or someone) can investigate more when I have a chance...Here's a reprex and the result. The first
expect_doppelganger()
without axis labels succeeds, but if I add the labels it fails.( https://github.com/yutannihilation/vdiffr-test-svglite-error/blob/master/tests/testthat/test-vdiffr.R )
Result