Open warrenfm opened 2 months ago
Hi Warren,
Thanks for the detailed bug description. It would be good if you could clean it up a little so that I know what to focus on and there are a lot of packages that seem to be non-essential for the bug.
I think your problem is that the spread returns a new object with all the boxes in the right position and your old values are no longer applicable. Here's an example that I think does what you want:
boxes <- alignVertical(reference = visit1_a,
visit1_a, visit2_a, visit3_a, visit4_a, visit5,
.position = "top") %>%
spreadHorizontal()
for (i in 2:length(boxes)) {
connectGrob(boxes[[i - 1]], boxes[[i]], type = "h") |>
print()
}
I like the layout features you've been using with the bold text. This could possibly be a nice new feature, can you suggest how you think an API for this should look?
Hi Gmisc,
Thanks for coming up with this fantastic package. I had a great time with it.
I noticed that when connecting boxGrobs that have been spreadHorizontal, the package maps the initial position of the boxGrob instead of the new position after being evenly spread. I've attached the initial flow analysis diagram with the error I've noted above and a second script where I had to create transparent dummy boxGrox with alpha = 0.01. This helped with mapping the new/correct positions of the boxGrobs after spreadHorizontal function.
Also to mention that we used this package for this analysis: https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0306131
I couldn't attached the R script, the code is below:
Thanks
Warren