How to remove left white space in heatmap.2 output

Viewed 5606

With this code

 library(gplots)

 # Read data
 dat <- read.table("http://dpaste.com/1501148/plain/",sep="\t",header=T);
 rownames(dat) <- dat$Name
 dat <- dat[,!names(dat) %in% c("Name")]

 #Set colour
 hmcols <- rev(redgreen(2750));

 pdf("~/Desktop/tmp.pdf")

 # Plot the figure, we don't want KEY in the plot and no dendrograms also.
 heatmap.2(as.matrix(dat),Colv=FALSE,dendrogram="none",scale="row",col=hmcols,trace="none",  margin=c(5,15), lwid=c(1.5,2.0),key=FALSE);
 dev.off()

It output the following figure: enter image description here

Note that it has too many white space on the left. How can I remove it? In principle I want to do left-justify of the whole heatmap.

1 Answers
Related