Try playing with the
width, height
of the pdf()
Tal
On Tue, Aug 25, 2009 at 2:04 AM, dorothyc <dorothyc@bcgsc.ca> wrote:
> Hi,
>
> I'm trying to save heatmaps as PDFs.  However, the PDF version of the
> heatmaps (Heatmap_CAFvsTNF_run2.pdf) is blurred when compared to its
> counterpart, which was saved manually by using the software
"Grab"
> (Heatmap_CAFvsTNF_run2.tiff).
>
>  -----R code--------
>        sample_output <- "stroma_run2"
>        filename <-
"exp_limma_results_final_probesets_Pbelowpoint05.txt"
>
>        # read in data
>        my.data <- read.delim(filename, sep="\t")
>        my.dataM <-my.data[,2:ncol(my.data)]
>
>        hr <- hclust(as.dist(1-cor(t(my.dataM),
method="pearson")),
> method="complete")
>        hc <- hclust(as.dist(1-cor(my.dataM,
method="spearman")),
> method="complete")
>
>         # generate heat map
>        library(gplots)
>
>        if  (is.null(sample_output)) {
>                pdf( "Heatmap.pdf")
>        } else {
>                pdf(file=paste("Heatmap_", sample_output,
".pdf", sep="")) }
>
>
>        heatmap.2(as.matrix(my.dataM),Rowv=as.dendrogram(hr),
> Colv=as.dendrogram(hc),cexRow=0.01,
>                        cexCol=0.8, dendrogram="none",
col=greenred(100),
> scale="row",key=TRUE,
trace="none",density.info="none",
>                        symkey=FALSE, main=paste("Heatmap_",
sample_output))
>
>       dev.off()
>
> --------------
>
> Thanks,
> Dorothy
>
> ______________________________________________
> 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.
>
-- 
----------------------------------------------
My contact information:
Tal Galili
Phone number: 972-50-3373767
FaceBook: Tal Galili
My Blogs:
http://www.r-statistics.com/
http://www.talgalili.com
http://www.biostatistics.co.il
	[[alternative HTML version deleted]]