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

2008-05-07 Thread Alexy Khrabrov

On May 6, 2008, at 10:30 PM, Prof Brian Ripley wrote:

What were H & W?  For png() they are (by default) in pixels, for  
pdf() in inches.


You haven't told us your OS, but I guess Mac OS.  Please update to R  
2.7.0: that offers you two new png() devices for higher-quality  
plots, and various other improvements.  (If you want to use the  
cairo-based png() at other than 72dpi, use R-patched or remember  
that the pointsize is mistakenly in pixels.)


For some reason, R 2.6.2 on Mac OSX (indeed) stopped doing png at all,  
even for plot(1:10).  I've been using a postcard printer with A5 size  
in between, was wondering if that affected things -- and changed that  
in Page Setup to US Letter, to no avail.  H an W were 600 x 800,  
resp., and most importantly this same code worked with R 2.6.0 before...


In any case, simply went and installed the 2.7.0, recompiled littler,  
and it all works fine now, just as before.  (Hope the 4/22 build for  
Mac OSX incorporates Simon's recentmost fixes.)  Thanks!


Cheers,
Alexy

__
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.


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

2008-05-06 Thread Prof Brian Ripley
What were H & W?  For png() they are (by default) in pixels, for pdf() in 
inches.


You haven't told us your OS, but I guess Mac OS.  Please update to R 
2.7.0: that offers you two new png() devices for higher-quality plots, and 
various other improvements.  (If you want to use the cairo-based png() at 
other than 72dpi, use R-patched or remember that the pointsize is 
mistakenly in pixels.)


On Tue, 6 May 2008, Alexy Khrabrov wrote:


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.


Not in this email -- very likely they are too small.

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

__
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.


--
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
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.


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

2008-05-06 Thread Charilaos Skiadas

On May 6, 2008, at 10:43 PM, Alexy Khrabrov wrote:

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?


What values do H,W have? Keep in mind, the numbers count pixels in  
png. And you have not given us a reproducible example.



Cheers,
Alexy


Haris Skiadas
Department of Mathematics and Computer Science
Hanover College

__
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.


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

2008-05-06 Thread Alexy Khrabrov
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

__
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.