魔术用箭头注释图片
magick annotate picture with arrows
我需要给图片添加箭头。目前我正在使用下面的代码,但我想让箭头更长。
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")
增加 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-06-05。
我需要给图片添加箭头。目前我正在使用下面的代码,但我想让箭头更长。
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")
增加 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-06-05。