开发者

Mountain like plot for data in Square matrix

I have data as a square matrix. I want to plot it like meshgrid in Matlab (mountains with color gradients). Also, if there is a big cliff, I want to label it. Something like shown below

Mountain like plot for data in Square matrix

The data I have is

            _92765  _222156 _384259 _384249 _384247 _384250
_92765  -1  3.4 4.85106 8.12927 8.462   9.12643
_222156 3.4 -1  1.50877 3.66383 3.58554 3.69655
_384259 4.85106 1.50877 -1  4.48433 4.51367 4.14421
_384249 8.12927 3.66383 4.48433 -1  0.288   0.252
_384247 8.462   3.58554 4.51367 0.288   -1  0.196
_384250 9.12开发者_JAVA百科643 3.69655 4.14421 0.252   0.196   -1

How can I go about it? Thanks


Have you looked at the wireframe() function in the lattice library?

Here is an example from the on-line help:

library(lattice)    
wireframe(volcano, shade = TRUE,
    aspect = c(61/87, 0.4),
    light.source = c(10,0,10))

Mountain like plot for data in Square matrix

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜