I know that it is possible to "supress" some axis labels by implementing a hack like this:
# consider the range of the x variable to be between 0 and 1 ggplot(data = df, aes(x = x, y = y)) + geom_point() + scale_x_continuous(breaks = seq(0, 1, 0.1), labels = append(seq(0, 0.5, 0.1), rep("", 4))) Here I would only be showing the x axis labels from 0 through 0.5 and the tick marks at 0.6-1 would be "empty", however I also want to remove those tick marks while keeping the ones from 0 to 0.5
breaks = seq(0, 0.5, 0.1)andlabels = seq(0, 0.5, 0.1)?breaks = c(0.2, 0.46, 0.86)andlabels = c(0.2, 0.46, 0.86)+ theme(panel.grid.major.y = element_blank(), panel.grid.minor.y = element_blank()). More details here: stackoverflow.com/questions/11335836/…