看板 R_Language 關於我們 聯絡資訊
文章分類提示: - 問題: 當你想要問問題時,請使用這個類別 [問題類型]: 程式諮詢(我想用R 做某件事情,但是我不知道要怎麼用R 寫出來) [軟體熟悉度]: 新手(沒寫過程式,R 是我的第一次) [問題敘述]: 想在ggplot的contour上改變填充顏色(如heatmap)和在線上顯示數字 [程式範例]: # Generate data library(reshape2) # for melt volcano3d <- melt(volcano) names(volcano3d) <- c("x", "y", "z") # Basic plot v <- ggplot(volcano3d, aes(x, y, z = z)) v + geom_tile(aes(fill = z)) + stat_contour() [環境敘述]: Win7 32 bit, R.3.2.2 [關鍵字]: ggplot , contour -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 123.195.222.114 ※ 文章網址: https://www.ptt.cc/bbs/R_Language/M.1453995483.A.A18.html
Wush978: 改變顏色可以用 scale_fill_manual 01/29 00:28
hilbert6666: 誠徵懂RHADOOP的專家 01/29 10:29