【发布时间】:2015-06-20 10:27:39
【问题描述】:
我正在使用Rio,我有一个sample.csv,如下所示
hour,count
0300,0
0300,0
0300,1
0300,1
0300,2
0301,1
0301,2
0301,2
0301,3
我运行以下命令:
$ < sample.csv Rio -ge 'g + geom_bar(df, aes(hour, count))' | display
我明白了
display.im6: no decode delegate for this image format `/tmp/magick-Gvr3kRZh' @ error/constitute.c/ReadImage/544.
据我所知,geom_bar 首先需要数据集 df 然后是列,我不知道为什么我看不到图表,有人知道我错过了什么吗?
谢谢
【问题讨论】:
-
见docs.ggplot2.org/0.9.3.1/geom_bar.html。它首先需要映射,然后是数据。而且您实际上不必为数据指定
df,因为它已经在g中捕获。 -
如果你想指定
y美学,我认为你需要指定stat='identity'。 -
@bgoldst 谢谢,如果通过答案提交,我希望接受它。