ggplot2: Using gtable to move strip labels to top of panel for facet_grid

前端 未结 2 1626
慢半拍i
慢半拍i 2020-12-09 20:32

I am creating a graphic using facet_grid to facet a categorical variable on the y-axis. I decided not to use facet_wrap because I need space

2条回答
  •  清歌不尽
    2020-12-09 21:07

    I was struggling with a similar problem but putting the labels on the bottom. I've used a code adaptation of this answer. And recently found that

    ggplot2 ver.2.2.1.0 (http://docs.ggplot2.org/current/facet_grid.html)

    ~facet_grid(.~variable,switch='x')

    option which has worked beautifully for me.

提交回复
热议问题