[R] figure margins too large for a barplot in png, pdf ok

Alexy Khrabrov deliverable at gmail.com
Wed May 7 04:43:39 CEST 2008


I've used to have a script with a barplot command it in, preceded by a  
png:

png(graph.file,height=H,width=W)
barplot(t,names.arg=breaks[2:(length(t)+1)],tck=gridlines)

-- worked before R 2.6.2.  When I tried it in R 2.6.2, which I have  
for a while but didn't run with that script, it complained, the  
margins too large, and I've googled the messages from our list where  
neither height nor width had been specified.  Yet here they are  
specified here.

Calling same from R GUI draws the nice barplot in Quartz, and  
replacing png with pdf or postscript does fine.  Other graphs work  
fine with png.  Jpeg also complains; when I try various values for H  
or W, still the same -- how can I subdue the png?

Cheers,
Alexy



More information about the R-help mailing list