-
Notifications
You must be signed in to change notification settings - Fork 167
Open
Description
Using free() in a nested patchwork and trying to add a plot below with / throws an error. This also applies to the | and - operators regardless of whether the nesting is implicit or explicit.
Here are examples that throw the error:
p <- iris %>%
ggplot(aes(x = Sepal.Length, y = Sepal.Width)) +
geom_point()
(p + free(p)) / p
>> Error in split.default(names(settings), settings): first argument must be a vector
p / (p + free(p))
>> Error in split.default(names(settings), settings): first argument must be a vector
p + p / free(p)
>> Error in split.default(names(settings), settings): first argument must be a vector
p + free(p) | p
>> Error in split.default(names(settings), settings): first argument must be a vector
p + free(p) - p
>> Error in split.default(names(settings), settings): first argument must be a vectorInterestingly, it's fine if the free is not the final plot in the nested patchwork:
(free(p) + p) / pAlso, using design works:
(p + free(p)) + p + plot_layout(design = "AB\nCC")Without nesting is also fine:
free(p) / pMetadata
Metadata
Assignees
Labels
No labels