[R] Trellis devices and pointize

Patrick Connolly p_connolly at slingshot.co.nz
Mon Jun 9 08:54:25 CEST 2014


How is the pointsize set in trellis.devices?

>From my reading of the trellis.device help file, I understood that the
pointsize arg would be referenced to the call to the pdf function.

So I set up a trellis pdf device as so:

  trellis.device(device = pdf, file = "Singers.pdf", height = 160/25.4,
                 width = 160/25.4, pointsize = 28)

A base R graphics plot works as I'd expected.

  plot(1:10, 50:59) # silly plot with huge plotting characters and letters

However, pointsize is ignored in trellis plots;

  pik <- bwplot(voice.part ~ height, data = singer)# pointsize ignored
  print(pik)
  dev.off()

There are many trellis cex-type settings, but FWIU they're all
relative to the default size.  My question is: How do I set that
default?


R version 3.0.2 (2013-09-25)
Platform: i686-pc-linux-gnu (32-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] grDevices utils     stats     graphics  methods   base     

other attached packages:
[1] RColorBrewer_1.0-5 lattice_0.20-24   

loaded via a namespace (and not attached):
[1] grid_3.0.2  plyr_1.8    tools_3.0.2

I've tried with R-3.1.0 on another machine so I don't think the
problem is with an old version.

I doubt it has much to do with pdf specifically.  Attempts to use png,
bitmap, postscript devices all produce equivalent results.



(Here's all the example code uninterrupted:)

  trellis.device(device = pdf, file = "Singers.pdf", height = 160/25.4,
                 width = 160/25.4, pointsize = 28)
  plot(1:10, 50:59) # silly plot with huge plotting characters and letters
  pik <- bwplot(voice.part ~ height, data = singer)# pointsize ignored
  print(pik)
  dev.off()


TIA


-- 
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.   
   ___    Patrick Connolly   
 {~._.~}                   Great minds discuss ideas    
 _( Y )_  	         Average minds discuss events 
(:_~*~_:)                  Small minds discuss people  
 (_)-(_)  	                      ..... Eleanor Roosevelt
	  
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.



More information about the R-help mailing list