【发布时间】:2019-06-21 09:23:34
【问题描述】:
编造数据
Years (row): 0.5, 0.5, 1.1, 2.0
A: (column 1): 1, 0, 1, 1
B: (column 2): 0, 0, 1, 1
C: (column 3): 0 ,1 ,0, 0
我尝试在 R 中为我的数据制作热图,我希望在 Y 轴和 x 轴上获得不同标记(A、B、C)的结果,我会喜欢有年份(> 200个数据)。
我尝试了许多不同的方法和组合,但不知何故我无法让它发挥作用。
我正在使用 R,我尝试使用 ggplot
library(ggplot2)
ggplot(Data,aes(x=Years,y=markers,fill=factor(Positive/Negative)))+geom_tile()
我知道这是不正确的,但我就是不知道如何让它发挥作用。
【问题讨论】: