문제

I'd like to make a true heat map in R, much like a weather map, except my data is much more simple.

Consider this 3d data:

x <- c(1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4)
y <- c(1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5)
z <- rnorm(20)

The z would be color.

Here is what a discrete looking heatmap would like for this data: enter image description here

How can I make a heatmap such that the colors are smooth and the full 2d space is filled with smoothed out colors based on the z values.

Please include sample code, not just a link that will probably confuse me even more, and I've probably already visited that site anyhow. Thanks :)

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top