是否可以在 R ggplot 中将自定义图像(比如 png 格式)显示为 geom_point?
library(png)
pic1 <- readPNG("pic1.png")
png("Heatmap.png", units="px", width=3200, height=3200, res=300)
ggplot(data_frame, aes(medium, day, fill = Transactions)) +
geom_tile(colour="white") +
facet_grid(dime3_year~dime3_month) +
scale_fill_gradient(high="blue",low="white") +
theme_bw() +
geom_point(aes(dime3_channel, day, size=Conv,alpha=Conv,image=(annotation_raster(pic1,xmin=0,ymin=0,xmax=5,ymax=5)),color="firebrick")) +
给出错误:
不知道如何为原型/环境类型的对象自动选择比例。默认为连续错误:美学长度必须为 1,或与 dataProblems 的长度相同:(annotation_raster(conv_pic, xmin = 0, ymin = 0, xmax = 5, ymax = 5))