Ordering the axis labels in geom_tile

后端 未结 5 1120
离开以前
离开以前 2020-12-28 09:31

I have a data frame containing order data for each of 20+ products from each of 20+ countries. I have put it in a highlight table using ggplot2 with code simila

5条回答
  •  执笔经年
    2020-12-28 09:48

    maybe this StackOverflow question can help:

    Order data inside a geom_tile

    specifically the first answer by Brandon Bertelsen:

    "Note it's not an ordered factor, it's a factor in the right order"

    It helped me to get the right order of the y-axis in a ggplot2 geom_tile plot.

提交回复
热议问题