程式諮詢(我想用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