I am trying to transform the secondary axis of a ggplot using the formula 1/10^x but I am not succeeding. Can someone help?
This is the reproducible code:
x <- as.factor(c(1,2,3,1,2,3,1,2,3,1,2,3))
y <- c(0.0541, 0.0706, 0.4803, 0.0151, 0.0729, 0.0689, 0.0986, 0.1949, 0.3323, 0.5166, 0.0988, 0.2321)
grupo <- as.factor(c(1,1,1,2,2,2,3,3,3,4,4,4))
br <- c(0,0.1, 0.2,0.3,0.4, 0.5, 0.6, 0.7)
df <- data.frame(x =x ,y = y, gr = grupo)
ggplot() +
geom_point(data=df, aes(x=x, y=y, group=gr, color= gr, shape= gr))+
geom_line(data=df, aes(x=x, y=y, group=gr, color= gr ))+
scale_y_reverse(limits = c(0.7, -0.05), breaks = br,
sec.axis = sec_axis(trans = ~.*10, breaks = br*10))
But I would like to show in the secondary axis the following numbers 1/10^br, that you can see in the image:

Thank you!!
