@@ -160,6 +160,12 @@ test_that("test ggstackplot() functionality", {
160160 vdiffr :: expect_doppelganger(
161161 " plot with custom template" ,
162162 ggstackplot(mtcars , x = mpg , y = c(qsec , drat ),
163+ template = ggplot() + geom_line())
164+ )
165+ vdiffr :: expect_doppelganger(
166+ " plot with template sec axis labs" ,
167+ ggstackplot(mtcars , x = mpg , y = c(qsec , drat ),
168+ alternate_axes = FALSE , both_axes = TRUE ,
163169 template = ggplot() + geom_line() + labs(x = " x" , y = " y" ))
164170 )
165171 vdiffr :: expect_doppelganger(
@@ -168,8 +174,8 @@ test_that("test ggstackplot() functionality", {
168174 mtcars , x = mpg , y = c(qsec , drat ),
169175 template =
170176 ggplot() + geom_line() +
171- scale_x_continuous(limits = c( 0 , 100 ) ) +
172- scale_y_continuous(limits = c( 0 , 100 ) )
177+ scale_x_continuous() +
178+ scale_y_continuous()
173179 )
174180 )
175181 vdiffr :: expect_doppelganger(
@@ -178,8 +184,8 @@ test_that("test ggstackplot() functionality", {
178184 mtcars , x = mpg , y = c(qsec , drat ),
179185 template =
180186 ggplot() + geom_line() +
181- scale_x_continuous(limits = c( 0 , 100 ) ) +
182- scale_y_continuous(limits = c( 0 , 100 ) ) +
187+ scale_x_continuous() +
188+ scale_y_continuous() +
183189 labs(x = " x" , y = " y" )
184190 )
185191 )
@@ -189,8 +195,8 @@ test_that("test ggstackplot() functionality", {
189195 mtcars , y = mpg , x = c(qsec , drat ),
190196 template =
191197 ggplot() + geom_line() +
192- scale_x_continuous(limits = c( 0 , 100 ) ) +
193- scale_y_continuous(limits = c( 0 , 100 ) )
198+ scale_x_continuous() +
199+ scale_y_continuous()
194200 )
195201 )
196202 vdiffr :: expect_doppelganger(
@@ -199,8 +205,8 @@ test_that("test ggstackplot() functionality", {
199205 mtcars , y = mpg , x = c(qsec , drat ),
200206 template =
201207 ggplot() + geom_line() +
202- scale_x_continuous(limits = c( 0 , 100 ) ) +
203- scale_y_continuous(limits = c( 0 , 100 ) ) +
208+ scale_x_continuous() +
209+ scale_y_continuous() +
204210 labs(x = " x" , y = " y" )
205211 )
206212 )
0 commit comments