Reputation: 395
In a faceted plot from ggplot2
package it is possible to change the position of tick marks by the functions like scale_x_continuous(position="top")
. However, if tick marks are to be placed on top, they appear above faceting panels, as here:
library(ggplot2)
ggplot(mpg, aes(displ, cty)) + geom_point() +
facet_grid(. ~ cyl) +coord_flip() +
scale_y_continuous(position="right")
Is it possible to place individual tick marks scales under the denotations of facets?
Upvotes: 1
Views: 288
Reputation: 5716
How about pushing the facet panel to the bottom?
library(ggplot2)
ggplot(mpg, aes(displ, cty)) + geom_point() +
facet_grid(. ~ cyl, switch='x') +coord_flip() +
scale_y_continuous(position="right")
Upvotes: 1