Assigning 40 shapes or more in scale_shape_manual

前端 未结 3 1307
时光取名叫无心
时光取名叫无心 2021-01-03 04:10

I have a data frame with more than 40 factor levels and I would like to assign different shapes for each level. However, as shown in the scale_shapes_table of ggplot2<

3条回答
  •  执念已碎
    2021-01-03 05:03

    Maybe use gr as labels, using ggrepel, easier to find a number than comparing shapes:

    library(ggrepel)
    
    ggplot(data = data, aes(x = x1, y = y1, label = gr))+
      geom_point() +
      geom_label_repel()
    

提交回复
热议问题