Skip to content

Commit a078f9a

Browse files
committed
Update ggplot deprecations
1 parent 3f9f42d commit a078f9a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

R/base_figure.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ whittaker_base_plot <- function(color_palette = NULL) {
8484
y = precp_cm,
8585
fill = biome),
8686
# adjust polygon border
87-
colour = "gray98",
88-
size = 1) +
87+
colour = "gray98",
88+
linewidth = 1) +
8989
# fill the polygons with predefined colors
9090
ggplot2::scale_fill_manual(name = "Whittaker biomes",
9191
breaks = names(color_palette),

tests/testthat/test-base_plot.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ test_that('function and arguments work correctly', {
1818
regexp = "Names for 'color_palette'")
1919

2020
tlc_legend <- whittaker_base_plot() +
21-
theme(legend.position = c(0.2, 0.75),
21+
theme(legend.position = "inside",
22+
legend.position.inside = c(0.2, 0.75),
2223
panel.background = element_blank(),
2324
panel.grid.major = element_line(gray(0.2)),
2425
panel.border = element_rect(fill = NA))

0 commit comments

Comments
 (0)