I am trying to reverse the secondary X axis on top of my ggplot.
ggplot(
data=MasterTable, aes(x=Concentration, y=Signal, color=factor(Assay))) +
scale_x_continuous("Chemical 1",
sec.axis = sec_axis(~ . *1, name = "Chemical 2"), scale_x_reverse(limits=c(400,0)))
If you remove the last section of the code (scale_x_reverse
...) it makes a plot with a secondary that is identical to the bottom X axis. I have managed to reverse the bottom axis but this also reverses the top axis. I am looking to only reverse the top axis.
Any help on this would be really appreciated.
Thanks!
See Question&Answers more detail:os