grid パッケージでカラースケールをプロットしたい。heat.plot (10) のようなもの。
私はこのようなことを試みています:
require(grid)
legendViewport <- viewport(height=0.3, width=0.8)
pushViewport(legendViewport)
grid.rect(gp = gpar(col = "gray90"))
0 から 1 を 10 に分割し、heat.colors (10) を埋めたいとしましょう。それを行う簡単な方法はありますか。