-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed byrow=FALSE
reorder not only plots but also labels
#203
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,3 +98,18 @@ test_that("alignment", { | |
plot_grid(p1, p2, ncol = 1, align = 'v', axis = "rl") + theme_map() | ||
) | ||
}) | ||
|
||
|
||
|
||
test_that("labels reorder by byrow", { | ||
|
||
p_list <- lapply(1:3, \(x) ggplot()) | ||
|
||
expect_doppelganger("byrow is TRUE", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No visual tests please. (I meant to say this in my original comment but now reading it again I did not explicitly do so.) Visual tests cause constant headaches, and they get disabled all the time because the false positive rate is so high. Instead, you can extract the location of the labels using the code I posted (e.g., |
||
plot_grid(plotlist = p_list, ncol = 2, labels = 1:3, byrow = TRUE) | ||
) | ||
|
||
expect_doppelganger("byrow is FALSE", | ||
plot_grid(plotlist = p_list, ncol = 2, labels = 1:3, byrow = FALSE) | ||
) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this code block be enclosed in curly braces? Otherwise line 183 gets executed regardless of whether the condition is true or not, no? Either way, please add curly braces for clarity.