I'm trying to create a boxplot using ggplot2 in R, below is my code and the plot it produces. I want to change it so instead of having the x axis labelled as 0.5mg, 0.5mg, 1mg, 1mg, 2mg and 2mg, I want just 0.5mg, 1mg, and 2mg between each of the sets of two box plots. Is there any way to do this?
ggplot(ToothGrowth, aes(x=interaction(supp, dose), y=len, fill=supp)) +
geom_boxplot() +
scale_x_discrete(labels = c("0.5mg", "0.5mg", "1mg", "1mg", "2mg", "2mg"), name = "Dosage") +
scale_y_continuous(name = "Tooth Length") +
scale_fill_discrete(name = "Supplement",
labels = c("Orange Juice", "Ascorbic Acid"))