shift only the position of x-points when y-axis is categorical in ggplot2
note that mpg/12 is intentionally there. If you remove it, points of x = mpg, and points of x = mpg (2nd) will merge one above the other.
I would like to shift points of the 2nd mpg in y-axis.
However, y-axis is categorical.
How i can do this?
ggplot(data = mtcars, aes(x = mpg, y = reorder(cyl, -mpg), color = cyl)) +
geom_point() + scale_color_gradient(low = "lightgreen", high = "darkgreen") + new_scale_colour()+
geom_point(aes(x = mpg/12, y = reorder(cyl, -mpg), color = cyl) ) +
scale_color_gradient(low = "lightblue", high = "darkblue")