I am using R Notebooks and have a chunk with some code for arranged histograms. When I use a common legend it produces an extra empty plot, which looks terrible in the rendered html file. This phenomenon disappears without a shared legend, but the plot looks terrible since they are not of the same size. Is there any way to stop it from producing an extra empty graph?
and the code being used in the chunk
```{r}
ggarrange(
gghistogram(data, title="MOTIVATION SCORES", x="MOTIVATION", y="..density..",
add_density=TRUE, add = "median", rug = TRUE, bins=15, color="#69c8ECFF",
fill="#69c8ECFF") ,
gghistogram(data, title="MOTIVATION BY AGE GROUP", x = "MOTIVATION",
y="..density..", add_density=TRUE,
add = "median", rug = TRUE, bins=15,
color = "AGE_GROUP", fill = "AGE_GROUP",
palette = c("#69c8ECFF", "#E762D7FF")
)
, legend = "bottom"
, common.legend = TRUE
)
```