2
我想用網格包繪製色彩座標。像heat.plot(10)。在網格圖中繪製色彩座標r
我想是這樣的:
require(grid)
legendViewport <- viewport(height=0.3, width=0.8)
pushViewport(legendViewport)
grid.rect(gp = gpar(col = "gray90"))
比方說,我想分0比1,到10,並填寫heat.colors(10)。有沒有簡單的方法來做到這一點。
'grid.raster(heat.colors(10))' – baptiste 2012-07-29 22:12:38
嘗試[這一個](https://gist.github.com/3202137)也許,或瀏覽lattice或ggplot2的源代碼 – baptiste 2012-07-29 22:17:22