【问题标题】:magick annotate picture with arrows魔术师用箭头注释图片
【发布时间】:2018-06-05 16:50:41
【问题描述】:

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

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")

【问题讨论】:

    标签: r magick-r-package


    【解决方案1】:

    增加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 package (v0.2.0) 于 2018 年 6 月 5 日创建。

    【讨论】:

      猜你喜欢
      • 2018-07-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多