[R] margins in heatmap.2 and fond size for x-axis

Weiwei Shi helprhelp at gmail.com
Tue Oct 31 18:28:02 CET 2006


Hi,

I am using heatmap.2 and have this problem now:

heatmap.2(as.matrix(t7[,4:8]), col=c("green", "yellow", "red"),
margins=c(35,10)+0.1, RowSideColors=class.colors, trace="none",
ylab="drugs", xlab="network signatures", scale="none")#

I put the following line into a function and call that function
(i.heatmap.1) and R complains:
Error in plot.new() : figure margins too large

I have to manually enlarge this "empty" one and re-call that function
so I can get result. I tried to use par(mar) but it seems it does not
help:

> par(mar=c(25,4,4,4)+0.1)
Warning message:
calling par(new=) with no plot
> i.heatmap.1(t7, "non-ox")
Error in plot.new() : figure margins too large
Error in par(op) : invalid value specified for graphical parameter "pin"
In addition: Warning message:
calling par(new=) with no plot

The reason I need a large margin is my xaxis font is too long, like
"ng_sodium_transport". I googled the r-help and found there is no way
to make it smaller since I am using the smallest = 1. Is there other
way around?

Thanks


-- 
Weiwei Shi, Ph.D
Research Scientist
GeneGO, Inc.

"Did you always know?"
"No, I did not. But I believed..."
---Matrix III



More information about the R-help mailing list