I am trying to use the A true heat map in R suggestions, however I get the error:
Error in interp.old(x, y, z, xo = xo, yo = yo, ncp = 0, extrap = extrap,
: scales of x and y are too dissimilar
after the code line:
s <- interp(x,y,z)
My data was constructed expecting to get coloured heat-map like lines in a dark continuous background, and works in GNUplot
using set pm3d map
and set hidden3d
. The data corresponds to a model of molecules production (y
) in a given time (x
) with the frequency of appearance denoted by z
. It looks like this:
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
The first suggestion gave me some ugly results similar the ones obtained at first in A true heat map in R which is a plot with some horizontal lines full of dots in different gray-scale tones. The second seems to crash. I got this message from it:
>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
I just included more data in case it is helpful. I am calling the columns from the data frame this way:
coso <- read.table("/home/libertad/mygraphs/two/two_1_90/coso.txt", header = FALSE,sep = "\t")
>x <-coso[[1]]
>y <-coso[[2]]
This is one of my graphs in GNUplot, I expected to get nicer ones with R.