How to draw a nice arrow in ggplot2

后端 未结 4 1224
暖寄归人
暖寄归人 2020-12-08 19:36

I am creating a ggplot chart where I want to have some arrows between two points. The main task is easily done with geom_line(arrow = arrow()). How

4条回答
  •  心在旅途
    2020-12-08 20:03

    In the latest (and I mean devtools::install_github("tidyverse/ggplot2") latest, as of writing this answer - I'm sure they'll mainline it soon enough) version of ggplot2, there is a linejoin argument to geom_segment. Using linejoin='mitre' will provide crisp edges. See the following for details.

提交回复
热议问题