I am attempting to make a facet grid of boxplot split by the MS and HC condition in which participants 1-15 should be under MS and 16-20 should be under HC. I am unsure how the first facet containing the MS has an x point for 16 still. I'd like to get rid of this. Thank you!
Here is my script:
VAS_DATA$Condition <- factor(VAS_DATA$Condition, levels=c("MS","HC"))
##boxplot grouped by participant, separated by condition
Level_of_Change_Boxplot <- ggplot(data = VAS_DATA, mapping = aes(group =Participant.ID, x=Participant.ID, y = level_change, fill=Participant.ID)) +
geom_boxplot()+
scale_x_continuous("Participant ID", labels = as.character(VAS_DATA$Participant.ID), breaks = VAS_DATA$Participant.ID)+
labs(title='Level of Change Between VAS Responses of MS and HC',x='Participant ID',y='Degree of Change in Score Response')+
theme(plot.title = element_text(hjust = 0.5), legend.position="none")+
geom_jitter(position = position_jitter(height = 0, width = .3))+
facet_grid(~Condition, scales="free_x",space = "free_x")