我正在尝试在 R 建议中使用 A 真实热图,但是出现错误:
interp.old(x, y, z, xo = xo, yo = yo, ncp = 0, extrap = extrap,
: x 和 y 的尺度太不相似
在代码行之后:
s <- interp(x,y,z)
我的数据被构建,期望在黑暗的连续背景中获得像线条一样的彩色热图,并且可以GNUplot
使用set pm3d map
和set hidden3d
. 数据对应y
于给定时间 ( x
) 内的分子生产模型 ( ),出现频率用 表示z
。它看起来像这样:
1.000000000000e+00 1e-8 0
1.000000000000e+00 5e-8 0
1.000000000000e+00 1e-7 5
1.000000000000e+00 5e-7 0
1.000000000000e+00 1e-6 0
1.000000000000e+00 5e-6 0
1.000000000000e+00 1e-5 0
1.000000000000e+00 5e-5 0
1.000000000000e+00 1e-4 0
1.000000000000e+00 5e-4 0
1.000000000000e+00 1e-3 0
1.000000000000e+00 5e-3 0
1.000000000000e+00 1e-2 0
1.000000000000e+00 5e-2 0
1.000000000000e+00 1e-1 0
1.000000000000e+00 5e-1 0
1.000000000000e+00 1e+1 0
1.000000000000e+00 5e+1 0
1.000000000000e+00 1e+2 0
1.000000000000e+00 5e+2 0
1.000000000000e+00 1e+3 0
1.000000000000e+00 5e+3 0
1.000000000000e+00 1e+4 0
1.000000000000e+00 5e+4 0
1.000000000000e+00 1e+5 0
1.000000000000e+00 5e+5 0
1.000000000000e+00 1e+6 0
1.000000000000e+00 5e+6 0
1.000000000000e+00 1e+7 0
1.000000000000e+00 5e+7 0
1.000000000000e+00 1e+8 0
1.000000000000e+00 5e+8 0
2.000000000000e+00 1e-8 0
2.000000000000e+00 5e-8 0
2.000000000000e+00 1e-7 0
2.000000000000e+00 5e-7 5
2.000000000000e+00 1e-6 0
2.000000000000e+00 5e-6 0
2.000000000000e+00 1e-5 0
2.000000000000e+00 5e-5 0
2.000000000000e+00 1e-4 0
2.000000000000e+00 5e-4 0
2.000000000000e+00 1e-3 0
2.000000000000e+00 5e-3 0
2.000000000000e+00 1e-2 0
2.000000000000e+00 5e-2 0
2.000000000000e+00 1e-1 0
2.000000000000e+00 5e-1 0
2.000000000000e+00 1e+1 0
2.000000000000e+00 5e+1 0
2.000000000000e+00 1e+2 0
2.000000000000e+00 5e+2 0
2.000000000000e+00 1e+3 0
2.000000000000e+00 5e+3 0
2.000000000000e+00 1e+4 0
2.000000000000e+00 5e+4 0
2.000000000000e+00 1e+5 0
2.000000000000e+00 5e+5 0
2.000000000000e+00 1e+6 0
2.000000000000e+00 5e+6 0
2.000000000000e+00 1e+7 0
2.000000000000e+00 5e+7 0
2.000000000000e+00 1e+8 0
2.000000000000e+00 5e+8 0
3.000000000000e+00 1e-8 0
3.000000000000e+00 5e-8 0
3.000000000000e+00 1e-7 0
3.000000000000e+00 5e-7 0
3.000000000000e+00 1e-6 5
3.000000000000e+00 5e-6 0
3.000000000000e+00 1e-5 0
3.000000000000e+00 5e-5 0
3.000000000000e+00 1e-4 0
3.000000000000e+00 5e-4 0
3.000000000000e+00 1e-3 0
3.000000000000e+00 5e-3 0
3.000000000000e+00 1e-2 0
3.000000000000e+00 5e-2 0
3.000000000000e+00 1e-1 0
3.000000000000e+00 5e-1 0
3.000000000000e+00 1e+1 0
3.000000000000e+00 5e+1 0
3.000000000000e+00 1e+2 0
3.000000000000e+00 5e+2 0
3.000000000000e+00 1e+3 0
3.000000000000e+00 5e+3 0
3.000000000000e+00 1e+4 0
3.000000000000e+00 5e+4 0
3.000000000000e+00 1e+5 0
3.000000000000e+00 5e+5 0
3.000000000000e+00 1e+6 0
3.000000000000e+00 5e+6 0
3.000000000000e+00 1e+7 0
3.000000000000e+00 5e+7 0
3.000000000000e+00 1e+8 0
3.000000000000e+00 5e+8 0
4.000000000000e+00 1e-8 0
4.000000000000e+00 5e-8 0
4.000000000000e+00 1e-7 0
4.000000000000e+00 5e-7 0
4.000000000000e+00 1e-6 0
4.000000000000e+00 5e-6 5
4.000000000000e+00 1e-5 0
4.000000000000e+00 5e-5 0
4.000000000000e+00 1e-4 0
4.000000000000e+00 5e-4 0
4.000000000000e+00 1e-3 0
4.000000000000e+00 5e-3 0
4.000000000000e+00 1e-2 0
4.000000000000e+00 5e-2 0
4.000000000000e+00 1e-1 0
4.000000000000e+00 5e-1 0
4.000000000000e+00 1e+1 0
4.000000000000e+00 5e+1 0
4.000000000000e+00 1e+2 0
4.000000000000e+00 5e+2 0
4.000000000000e+00 1e+3 0
4.000000000000e+00 5e+3 0
4.000000000000e+00 1e+4 0
4.000000000000e+00 5e+4 0
4.000000000000e+00 1e+5 0
4.000000000000e+00 5e+5 0
4.000000000000e+00 1e+6 0
4.000000000000e+00 5e+6 0
4.000000000000e+00 1e+7 0
4.000000000000e+00 5e+7 0
4.000000000000e+00 1e+8 0
4.000000000000e+00 5e+8 0
第一个建议给了我一些丑陋的结果,类似于最初在R 中的 A true heat map 中获得的结果,这是一个带有一些水平线的图,其中充满了不同灰度色调的点。第二个似乎崩溃了。我从中得到了这条消息:
>Traceback:
1: .Fortran("idsfft", as.integer(1), as.integer(ncp), as.integer(n), as.double(x), as.double(y), as.double(z), as.integer(nx), as.integer(ny), x = as.double(xo), y = as.double(yo), z = zo, integer((31 + ncp) * n + nx * ny), double(5 * n), misso = as.logical(misso), PACKAGE = "akima")
2: interp.old(x, y, z, xo = xo, yo = yo, ncp = 0, extrap = extrap, duplicate = duplicate, dupfun = dupfun)
3: interp(x, y, z)
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
我只是包含了更多数据以防万一。我以这种方式调用数据框中的列:
coso <- read.table("/home/libertad/mygraphs/two/two_1_90/coso.txt", header = FALSE,sep = "\t")
>x <-coso[[1]]
>y <-coso[[2]]
这是我在 GNUplot 中的图表之一,我希望用 R 得到更好的图表。