I am beginner at R and trying to make a boxplot showing tumor accumulation of a certain product at different points over time, for two different conditions. I came up with the following image:
Boxplot with multiple groups + condition
I used this code:
ggplot(tumor, aes(x=time_point, y=IA, fill=condition)) + ggtitle ("Tumor accumulation") + xlab("Time post-injection (h)") + ylab("%IA/kg") + geom_boxplot()+ geom_point(position=position_jitterdodge(0))+ scale_x_discrete(limits=c("2", "24", "96", "144")) + scale_fill_brewer(palette="Paired") + theme_minimal() + expand_limits(y=0)
Because there is no data for condition C1 and 144 h time point, the appearance of the box on the far right is much bigger. I cannot seem to figure out how to change the width of this single box without altering the rest.


