Skip to content

Commit 6e41f07

Browse files
committed
accept the suggestion
1 parent a634f20 commit 6e41f07

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/guides-.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ Guides <- ggproto(
514514

515515
# we grouped the legends by the positions, for inside legends, they'll be
516516
# splitted by the actual inside coordinate
517-
for (i in seq_along(positions)[positions == "inside"]) {
517+
for (i in which(positions == "inside")) {
518518
# the actual inside position and justification can be set in each guide
519519
# by `theme` argument, here, we won't use `calc_element()` which will
520520
# use inherits from `legend.justification` or `legend.position`, we only
@@ -528,8 +528,8 @@ Guides <- ggproto(
528528
"legend.position.inside"
529529
]] %||% default_inside_position %||% inside_justs[[i]]
530530
)
531-
}
532531
}
532+
533533

534534
positions <- positions[keep]
535535
inside_positions <- inside_positions[keep]

0 commit comments

Comments
 (0)