R - gplots - Removing white space in heatmap.2 when key=FALSE -
i have:
library(gplots); x<-matrix(seq(1:100),nrow=10,byrow=true); heatmap.2(x, rowv=na, colv=na, scale="none", main="this title cut off white space non-existant key supposed go.", col=gray((255:0)/255), dendrogram="none",trace="none", key=false); when key specified false, there's block of white-space on left side of plot prevents full title showing up, conflicts manual specification of smaller margins, , moves heat-map toward right. width of white-space controllable using "keysize=#", making small (somewhere between 0.8 , 1.0) creates error: "error in plot.new() : figure margins large"
i try doing heatmap() instead of heatmap.2(), heatmap doesn't play par() need project. if has suggestions, i'd appreciate it.
positioning elements of heatmap.2 plot can done using layout parameter(s).
layout(mat = lmat, widths = lwid, heights = lhei) i pretty acceptable heatmap plot using following.
heatmap.2(x, rowv=na, colv=na, scale="none", main="this title cut off white space non-existant key supposed go.", col=gray((255:0)/255), dendrogram="none", trace="none", key=false, lmat=rbind(c(2),c(3),c(1),c(4)), lhei=c(1,1,9,0), lwid=c(1) ); please refer ?layout or this answer on stack exchange more details.
Comments
Post a Comment