I want to make a figure which have reversed y-axis and x-axis at y=0. y axis was reversed with scale_y_reverse, but x-axis stayed at the bottom.
p <- ggplot(df, aes(x= conc, y=depth, group=factor(stn), color=factor(stn)))+
geom_point(shape=1)+
geom_path(alpha=0.5)+
scale_y_reverse(limits=(c(20,0)), expand=c(0,0))+
scale_x_continuous(expand=c(0,0))
I tried the code from this post like in below, but didn't work.
p +
scale_x_continuous(guide = guide_axis(position = "top")) +
scale_y_continuous(guide = guide_axis(position = "right"))
I don't need to have two x-axis, simply just move from bottom to the top.