Skip to content

Commit 04827f5

Browse files
committed
test multiple inside legends with different positions
1 parent 2c1a0d1 commit 04827f5

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/testthat/test-guides.R

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,25 @@ test_that("guides are positioned correctly", {
268268
expect_doppelganger("legend inside plot, bottom left of legend at center",
269269
p2 + theme(legend.justification = c(0,0), legend.position.inside = c(0.5,0.5))
270270
)
271+
expect_doppelganger("legend inside plot, multiple positions",
272+
p2 +
273+
guides(
274+
colour = guide_colourbar(
275+
position = "inside",
276+
theme = theme(
277+
legend.position.inside = c(0, 1),
278+
legend.justification.inside = c(0, 1)
279+
)
280+
),
281+
fill = guide_legend(
282+
position = "inside",
283+
theme = theme(
284+
legend.position.inside = c(1, 0),
285+
legend.justification.inside = c(1, 0)
286+
)
287+
)
288+
)
289+
)
271290
})
272291

273292
test_that("guides title and text are positioned correctly", {

0 commit comments

Comments
 (0)