ggplot2: secondary axis on the same side as the primary

Viewed 271

Is it possible to put the secondary scale in ggplot2 on the same side as the primary one? (I'm talking about a secondary axis that is a one-to-one transformation of primary axis, so I avoid problems outlined here, the issue is purely the placement of the scale.)

Example: enter image description here

1 Answers

could solve what you want ?

ggplot(data = mpg) + 
  geom_point(mapping = aes(x = displ, y = cty))+
  facet_wrap(~ manufacturer, nrow = 2)
Related