3

我需要在图片上添加箭头。目前我正在使用下面的代码,但我想让箭头更长。

library(magick)
tiger <- image_read_svg('http://jeroen.github.io/images/tiger.svg', width = 400)
print(tiger)

tiger  %>%
  image_annotate(., "Tiger's mouth", size = 15, color = "red",
  boxcolor = "gold", degrees = 00, location = "+196+250", font = 'Times') %>% 
  image_annotate( sprintf('\u2191'), size = 15, color = "red",
  boxcolor = "gold", degrees = 270, location = "+180+265")

在此处输入图像描述

4

1 回答 1

3

增加size应该做的事

library(magick)
tiger <- image_read_svg('http://jeroen.github.io/images/tiger.svg', width = 400)
print(tiger)

tiger  %>%
  image_annotate(., "Tiger's mouth", size = 20, color = "red",
                 boxcolor = "gold", degrees = 00, location = "+250+250", 
                 font = 'Times') %>% 
  image_annotate( sprintf('\u2191'), size = 50, color = "blue",
                  boxcolor = "transparent", degrees = 270, location = "+190+275")

reprex 包(v0.2.0)于 2018 年 6 月 5 日创建。

于 2018-06-05T17:38:18.040 回答