This is like a similar question that I posted two years ago. I have the following dataset.
dat <- read.table(header=TRUE, text=\"
Age ColA ColB Col
How's this:
dat1$new_value <- ifelse(dat1$value<=3,dat1$value,ifelse(dat1$value<7,NA,dat1$value-2))
dat1 <- dat1[!is.na(dat1$new_value) ,]
p = ggplot(dat1, aes(x=Age, y=new_value, group=variable))
p + geom_line(aes(colour = variable), size=1.2)+theme_bw()+
theme(text = element_text(size=20),
axis.text.x = element_text(angle=90, vjust=1)) +
scale_y_continuous(breaks = 1:6, labels = c(1:3,"break",7:8))