How to nicely annotate a ggplot2 (manual)

前端 未结 3 1360
逝去的感伤
逝去的感伤 2020-11-30 18:38

Using ggplot2 I normally use geom_text and something like position=jitter to annotate my plots.

However - for a nice plot I of

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-30 19:39

    These days there are packages adding labeling:

    1. geom_dl from the directlabel package with automatic data filtering to avoid repeated labels and
    2. geom_label_repel and geom_text_repel from package ggrepel make labels that try to avoid sitting on top of the data or each other and which in the case of geom_label_repel have a boundary and a non-transparant background.

提交回复
热议问题