I am new to R and ggplot and have been trying to remove part of y-axis range for hours and still haven't managed to make it happen. I wrote the following code snippet to make things reproducible in case someone knows the answer. So here is a code snipped:
library(ggplot2)
p<- ggplot(data.frame(), aes(color=c("I","Y","I","Y","I","Y"), y=c(75.33,72.95,86.46,79.63,1136.09,993.27), x=c(1,1,2, 2,3, 3))) +
geom_line() +
geom_point()+
scale_x_continuous(breaks=c(1,2,3),labels = c("A","B","C"))+
scale_y_log10() +
annotation_logticks(sides = "l")+
theme(legend.position = "none")+ labs(x = "", y = "")
print(p)
And the plot looks like
I want to remove the y-axis range from 100 to 900 to help with the visibility of the values below 100. I have already tried this and this but neither of them work (I get weird NA erros, etc). Would appreciate a help.