UUPharmacometrics / xpose

Graphical diagnostics for pharmacometric models
https://uupharmacometrics.github.io/xpose
GNU Lesser General Public License v3.0
55 stars 29 forks source link

Cannot use grid arrange #102

Open quantny opened 6 years ago

quantny commented 6 years ago

Hello,

I am trying to use grid arrange so I can put the basic GOF plots all on the same page in a PDF file. However when I do this the plot title such as DV vs. PRED and number of observations disappear and revert to their references , @y vs. @x @run @ofv. Do you know how I can do this without losing this information.

Thanks

Justus

bguiastr commented 6 years ago

Similar to #91 and #93. It would be quite cumbersome to develop print methods for each existing external package. Instead I can suggest adding a function parse_keywords() to be used within functions like grid.arrange() as follows:

grid.arrange(
 parse_keywords(dv_vs_pred(xpdb)),
 parse_keywords(dv_vs_ipred(xpdb))
)

Would this be an acceptable solution?

ananthha commented 5 years ago

This solution does not seem to work: It gives an error: argument "xpdb" is missing, with no default I tried the following code. grid.arrange( parse_title(dv_vs_pred(xpdb)), parse_title(dv_vs_ipred(xpdb)) )

jpryby commented 2 months ago

There's a workaround for this. Since this issue is still open and comes up on search and doesn't seem to be resolved, posting it here.

Also works for ggpubr::ggarrange

grid.arrange(
    print(dv_vs_ipred(xpdb)),
    print(dv_vs_pred(xpdb)),
    ncol= 1
)
jpryby commented 2 months ago

This is related to #156 , and the workaround applies to both.