Skip to content

Commit 3f63d62

Browse files
authored
Add default value for legend.position (#2642)
Fixes #2640
1 parent e0bb608 commit 3f63d62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/plot-build.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ ggplot_gtable.ggplot_built <- function(data) {
159159
plot_table <- layout$render(geom_grobs, data, theme, plot$labels)
160160

161161
# Legends
162-
position <- theme$legend.position
162+
position <- theme$legend.position %||% "right"
163163
if (length(position) == 2) {
164164
position <- "manual"
165165
}

0 commit comments

Comments
 (0)