カスタム画像(png形式など)をR ggplotの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")) +
エラーが発生します:
タイプ proto/environment のオブジェクトのスケールを自動的に選択する方法がわかりません。デフォルトの連続エラー: 美学は長さ 1 であるか、dataProblems と同じ長さでなければなりません:(annotation_raster(conv_pic, xmin = 0, ymin = 0, xmax = 5, ymax = 5))