With this code:
library(ggplot2)
ToothGrowth$dose <- as.factor(ToothGrowth$dose)
p <- ggplot(ToothGrowth, aes(x=dose, y=len, color=dose, shape=dose)) +
geom_jitter(position=position_jitter(0.2))+
labs(title="Plot of length by dose",x="Dose (mg)", y = "Length")
p + theme_classic()
I expect to get image like this:
But how come I get this instead:
Notice the missing x-axis an y-axis line. How can I enable it?
This is theme_classic()
specific issue.