You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I note that when I call condformat2grob the plot is immediately generated and displayed, even if what I'm trying to do is to store the grob in a variable for layout with ggarrange or grid.arrange. In my case, where I have two conditionally formatted tables and one ggplot layed out with ggarrange, this causes knitr to output first the one table, then the second one, and then the composite figure (which itself is just fine).
I seem to have fixed this myself by altering the source code -- I commented out two function calls right at the end of the condformat2grob function: grid::grid.newpage() and grid::grid.draw(gridobj). The subsequent call (invisible(gridobj)) seems to return the grob properly, and my ggarrange layout works as it should.
Knocking out these two lines probably messed up something elsewhere (so not going to make a PR out of this), but for my purposes it works perfectly. Thanks for your work on this -- it's fantastic!
The text was updated successfully, but these errors were encountered:
I note that when I call
condformat2grob
the plot is immediately generated and displayed, even if what I'm trying to do is to store the grob in a variable for layout withggarrange
orgrid.arrange
. In my case, where I have two conditionally formatted tables and one ggplot layed out withggarrange
, this causes knitr to output first the one table, then the second one, and then the composite figure (which itself is just fine).I seem to have fixed this myself by altering the source code -- I commented out two function calls right at the end of the
condformat2grob
function:grid::grid.newpage()
andgrid::grid.draw(gridobj)
. The subsequent call (invisible(gridobj)
) seems to return the grob properly, and myggarrange
layout works as it should.Knocking out these two lines probably messed up something elsewhere (so not going to make a PR out of this), but for my purposes it works perfectly. Thanks for your work on this -- it's fantastic!
The text was updated successfully, but these errors were encountered: