On Aug 8, 2011, at 11:53 AM, Colin Ford wrote:

Hi Pete,

I thought it might be something to do with NA's when I first started but its not. I've attached both the image output and the data.

No, you haven't. Probably was an unacceptable file type.

Its almost as if the blocks in the heatmap are not quite meshing together? I've tried heatmap.2 as well and that gave the same result. I also just tried the image command and that was giving the same result as well.

What I'm wanting are blocks together without the white lines going through but just cant seem to find a way to do that?

Sounds like the old problem of buggy pdf viewers relating to problems with anti-aliasing. Further commentary would probably be available had you included any machine or OS specifics, but why not search in the Archives before sending further material?

Search terms likely to be productive: white lines anti-aliasing pdf

(or variations there within)

--
David



Best regards,
Col.

________________________________
From: Peter Morgan <morga...@cardiff.ac.uk>
To: Colin Ford <col_f...@yahoo.com>
Sent: Monday, 8 August 2011, 14:37
Subject: Re: [R] heatmap is producing unwanted horizontal and vertical lines?


Hi Col,

Without seeing your data and the heatmap
you are plotting it is hard to tell what is going on. Are the NAs in any
pattern?  NAs appear in heatmap as the background colour which is
white by default since they are plotted transparently (see the image( ) command for details). If this is the case, you could be seeing the pattern
of NAs plotted in white.

Also, have you tried the the heatmap.2(
) option in gplots?

Regards,

Pete
From:

Date:
 08/08/2011 13:05
Subject:
   [R] heatmap
is producing unwanted horizontal and vertical lines?
Sent by:
   r-help-boun...@r-project.org
________________________________

Hello,

I must start by saying that I am an R novice and am sorry if this is a
no-brainer...

I have an csv file that contains a grid of 300x300 data points. Each point represents a 1Km square on a map. Each point is either a floating point number or NA. I load the
data in with:

  data <- read.csv("matrix.csv", sep=',')

Convert the data to a matrix with:

  data_matrix <- data.matrix(data)

and then produce the heatmap with:

data_heatmap <- heatmap(data_matrix,Rowv=NA,Colv='Rowv',margin=c(0,0))

The heatmap is displayed in a separate window as expected and
looks correct apart from fine white banding lines spaced out evenly over the image running horizontally across the image?

At first I thought it was my data but I checked that and its not. If I
resize the image I then see white vertical lines and different horizontal
lines appear?

I've tried a number of different settings but can't seem to get
rid of these lines.
If I can get rid of them the image will be ideal and just what I want.
Does anyone have any idea of what I'm doing wrong?

Best regards,
Col.

--
David Winsemius, MD
West Hartford, CT

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to