I have a ggplot with facet_wrap of about 22 different plots. I'm trying to make them interactive using ggplotly, but for some reason certain rows of plots have their header area get larger to the point where I barely see the graph. It looks like all the plots in the same row have the same gray sized area. I'm just trying to generate the plot, but keep the gray title area the same size. Any help would be greatly appreciated. I've tried to look at the panel options, but couldn't find anything that would do what I needed, but I'm not sure if I'm just missing something.
p <- ggplot(data = df, aes(value, fill = FIELD))+
geom_histogram()+
facet_wrap(~variable, scales='free_x')
ggplotly(p)
I was able to replicate the error with...
library(titanic)
library(reshape2)
titanic_long <- melt(titanic_train)
p<-ggplot(data=titanic_long, aes(value))+
geom_histogram(aes(fill=Sex))+
facet_wrap(~variable, scales='free_x')
ggplotly(p)