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 would like to add the marginal plots to a gglot2 object, so the axis match. However, I could not manage it with the insert_xaxis_grob and axis_canvas.
combined_plot <- insert_xaxis_grob(p01, p05, position = "bottom")
it gives the warning:
stat_bin()usingbins = 30. Pick better value with binwidth. Warning messages: 1: Removed 6 rows containing missing values (geom_bar). 2: In get_panel(grob) : Multiple panels found; returning the first one. Select a panel with panelor return all withreturn_all = TRUE`.
and indeed only the first one is used.
Any suggestions to add more than one marginal plots on the axis, as I would like to compare the distribution between different groups.
Thanks very much.
The text was updated successfully, but these errors were encountered:
try this:
library(patchwork)
combined_plot <- insert_xaxis_grob(p01, wrap_plots(p05), position = "bottom") #wrap_plots would combine them as one
ggdraw(combined_plot)
I would like to add the marginal plots to a gglot2 object, so the axis match. However, I could not manage it with the insert_xaxis_grob and axis_canvas.
A very simple example
The major plot:
The margin, with facet_grid
combined_plot <- insert_xaxis_grob(p01, p05, position = "bottom")
it gives the warning:
and indeed only the first one is used.
Any suggestions to add more than one marginal plots on the axis, as I would like to compare the distribution between different groups.
Thanks very much.
The text was updated successfully, but these errors were encountered: