ggplot use small pie charts as points with geom_point

后端 未结 2 1813
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-01 08:19

I would like to make a graph with ggplot as shown below. The idea is to plot \"percentage matches\" between two categorical variables. It is easy to come close by altering the s

2条回答
  •  伪装坚强ぢ
    2021-02-01 09:21

    Using a plot as the shape for a point is tricky. However, you can side step the issue and get very close to your mockup using facet_grid():

    ggplot(temp) + 
      geom_bar(aes(x=1, y=Score), stat="identity") + 
      facet_grid(Exercise~Name) + 
      coord_polar(theta = "y") +
      scale_y_continuous(breaks = NULL) +
      scale_x_continuous(name = element_blank(), breaks = NULL)
    

    enter image description here

提交回复
热议问题