程式咨询(我想用R 做某件事情,但是我不知道要怎么用R 写出来)
[软件熟悉度]:
使用者(已经有用R 做过不少作品)
[问题叙述]:
大大们好
我想用ggplot画图
类似像这个
https://goo.gl/B4Gujy
不过我画出来颜色深浅没有出来 只有某个点有颜色 其他都灰色 图在下方
https://goo.gl/rq2s2q
想请问高手们问题出在哪里 谢谢
[程式范例]:
Data: https://goo.gl/w5RE2M
a<-read.csv("DT_6.csv")
a$finish_hms <- as.POSIXlt(a$finish_hms)
ggplot(a, aes(x=as.factor(finish_date), y=finish_hms, fill = timediff )) +
geom_dotplot(binaxis = "y",stackdir = "center", binwidth = 600 ) +
xlab("Date") + ylab("time") + ggtitle( paste("NO.8 Before")) +
scale_fill_gradient(low = 'blue', high = 'red')
[环境叙述]:
macbook pro 2015
[关键字]:
ggplot