I want to plot color scale with grid package. Something like heat.plot (10).
I am trying something like this:
require(grid) legendViewport <- viewport(height=0.3, width=0.8) pushViewport(legendViewport) grid.rect(gp = gpar(col = "gray90"))
Let's say I want to divide 0 to 1, into 10 and fill heat.colors (10). Is there a simple way to do it.