【发布时间】:2020-03-19 20:24:47
【问题描述】:
我有三个组(a、b、c)及其关联值,我想将它们绘制为条形图。
使用 ggplot,我想在每个栏中插入不同的图像(以 png 格式)。所以在a栏中,我想插入图像'a.png',在b栏中,图像'b.png'和c中的图像'c.png'
df = data.frame(
group = c('a', 'b', 'c'),
value = 1:3)
ggplot(df, aes(group, value)) +
geom_col()
我发现的几篇文章没有帮助或很旧。
Inserting an image to ggplot outside the chart area
https://www.reddit.com/r/rstats/comments/6qh4kt/how_to_make_ggplot_not_beautiful_insert_pictures/
你有什么想法吗?
谢谢
【问题讨论】: