Currently, the y axis value is (0, 0.05, 0.10, 0.15, 0.20...)
,
I want the axis value to be (0.7, 0.75, 0.80, 0.85, 0.90, ...)
How to accomplish this?
Currently, the y axis value is (0, 0.05, 0.10, 0.15, 0.20...)
,
I want the axis value to be (0.7, 0.75, 0.80, 0.85, 0.90, ...)
How to accomplish this?
Try this defining a sequence of values inside scale_y_continuous()
. Here and example using dummy data:
library(ggplot2)
#Data
df <- data.frame(Val=runif(100,0.7,1.5),
Group=sample(c('a','b','c'),size = 100,replace = T),
stringsAsFactors = F)
#Plot
ggplot(df,aes(x=Group,y=Val,color=Group))+
geom_point()+
scale_y_continuous(breaks = seq(0.7,1.5,by=0.05))
Output: