[R] pdf indifferent to lwd after some small number<1 (e.g. 0.18)

Chuen Tan tcs76.geo at yahoo.com
Fri Aug 6 18:16:49 CEST 2010


Hi,

To plot a figure, I used lwd=0.18 in the function lines() to plot very fine lines. However, using png() or pdf() to save the figure, it appears that lwd has no effect on pdf() beyond some small number (e.g. 0.18) and the lines looks much thicker than png(). Setting lwd<0.18 does not make the lines any finer in pdf(). I also tried specifying the argument lwd in par() instead and still faced the same problem. 

My understanding is pdf() allows lwd<1 but it seems that there is a lower bound. I hope to use pdf() instead of png() because the computer server gives the following error message when png is used: 
> png(file="tmp.png")
Error in X11(paste("png::", filename, sep = ""), width, height, pointsize,  : 
  unable to start device PNG
In addition: Warning message:
In png(file = "tmp.png") : unable to open connection to X11 display ''
> 

Thanks for the help and advice in advance regarding the problem I am facing.

Best regards,
stan

My mac machine:
> version
               _                            
platform       x86_64-apple-darwin9.8.0     
arch           x86_64                       
os             darwin9.8.0                  
system         x86_64, darwin9.8.0          
status                                      
major          2                            
minor          11.1                         
year           2010                         
month          05                           
day            31                           
svn rev        52157                        
language       R                            
version.string R version 2.11.1 (2010-05-31)
> 

The computer sever:
> version
               _                           
platform       x86_64-unknown-linux-gnu    
arch           x86_64                      
os             linux-gnu                   
system         x86_64, linux-gnu           
status                                     
major          2                           
minor          9.0                         
year           2009                        
month          04                          
day            17                          
svn rev        48333                       
language       R                           
version.string R version 2.9.0 (2009-04-17)
>



More information about the R-help mailing list