Im using the heatmap.2 function in R to create a clustered heatmap of some microarray data. My commands are written as this:

      heatmap.2 (as.matrix(highly_variable_genes,col=rev(morecols(50)),trace="none", main="Top 500 most variable genes across samples",ColSideColors=col.cell,scale="row"))

But even though I have specified that I don't want that hideous cyan squiggly 'trace' over my cells, which obscures everything, it keeps coming up. I've tried re-writing the command a few different ways and cannot get rid of it. Does anyone see what I have done wrong? 

This command is taken wholesale from a tutorial that has no trace over its heatmap cells so I really dont know whats going on here...unless the commands have been updated in R.

Many thanks for your help.

I agree that the tracing leaves much to be desired and I have never used it.

There is something peculiar about the way you have written your code - take a closer look at it. You are passing all of the following to 
`as.matrix()`, which fails to issue any warning: `x,col=rev(morecols(50)),trace="none", main="Top 500 most variable genes across samples",,scale="row"`

Here is a simple solution:

    require(gplots)

# generate random data

    x <- matrix(rexp(200, rate=.1), ncol=20)

# reproduce the 'bug' with trace lines

    heatmap.2(as.matrix(x,col=rev(morecols(50)), trace="none", main="Top 500 most variable genes across samples",,scale="row"))

<a href="https://ibb.co/ZX7gY05"><img src="https://i.ibb.co/fFLNnsf/g.png" alt="g" border="0"></a>

# get rid of trace lines

    heatmap.2(as.matrix(x), trace="none", main="Top 500 most variable genes across samples", scale="row")

<a href="https://ibb.co/jvZ9NC8"><img src="https://i.ibb.co/KjzcPt5/b.png" alt="b" border="0"></a>




