Dynamic position for ggplot2 objects (especially geom_text)?

后端 未结 4 1612
半阙折子戏
半阙折子戏 2020-12-13 20:52

When using ArcGIS to make maps, the software by default pushes point and polygon labels around automatically to avoid overlap using a proprietary algorithm. They refer to t

4条回答
  •  眼角桃花
    2020-12-13 21:08

    Check out the new package ggrepel. ggrepel provides geoms for ggplot2 to repel overlapping text labels. It works both for geom_text and geom_label.

    Figure is taken from this blog post.

提交回复
热议问题