【发布时间】:2018-01-31 10:56:34
【问题描述】:
我正在尝试使用 ggplot 创建一个热图,其中填充表示某些比率的大小。我目前有一个看起来像这样的表:
company survey type value
* <chr> <chr> <chr> <dbl>
1 Raps S1_2014 Revenue 282576375
2 Raps S2_2014 Revenue 654413143
3 Raps S3_2014 Revenue 365753902
我的ggplot代码是:
ggplot(df1, aes(x=survey, y=survey)) +
geom_tile(aes(fill=value/value))
如您所见,图中存在调查不与自身交互的空白(即 S1_2014 和 S3_2014)。我可以将这些交叉点编码到我的 ggplot 调用中吗?还是我需要整理数据?如果我确实需要争吵,我会怎么做?
谢谢。
【问题讨论】: