I am trying to run an R script to create a .png file containing a tree map on a 
headless Linux server using Xvfb.  When I try to run tmPlot, I get the 
following errors and warnings:

Error in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y,  : 
  X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at size 9 could 
not be loaded
Calls: tmPlot ... <Anonymous> -> widthDetails -> widthDetails.text -> grid.Call
In addition: Warning messages:
1: In grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y,  :
  X11 protocol error: BadMatch (invalid parameter attributes)
...
etc.  (complete error message below)

The .png file does contain a partially constructed graph.  When I try something 
simple like plot(x,y) I get a plot with warnings.

The results from capabilities() and X11Fonts() (see end of message) suggest to 
me that it should work.

Any idea what is happening and how to fix the problem (or work around it)?


Thanks,

Jay
--------------------------

> sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: x86_64-unknown-linux-gnu (64-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=C                 LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] treemap_1.0-4      data.table_1.8.0   RColorBrewer_1.0-5
> capabilities()
    jpeg      png     tiff    tcltk      X11     aqua http/ftp  sockets 
    TRUE     TRUE     TRUE     TRUE     TRUE    FALSE     TRUE     TRUE 
  libxml     fifo   cledit    iconv      NLS  profmem    cairo 
    TRUE     TRUE    FALSE     TRUE     TRUE    FALSE    FALSE 
> X11Fonts()
$serif
[1] "-*-times-%s-%s-*-*-%d-*-*-*-*-*-*-*"

$sans
[1] "-*-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*"

$mono
[1] "-*-courier-%s-%s-*-*-%d-*-*-*-*-*-*-*"

$Times
[1] "-adobe-times-%s-%s-*-*-%d-*-*-*-*-*-*-*"

$Helvetica
[1] "-adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*"

$CyrTimes
[1] "-cronyx-times-%s-%s-*-*-%d-*-*-*-*-*-*-*"

$CyrHelvetica
[1] "-cronyx-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*"

$Arial
[1] "-monotype-arial-%s-%s-*-*-%d-*-*-*-*-*-*-*"

$Mincho
[1] "-*-mincho-%s-%s-*-*-%d-*-*-*-*-*-*-*"

> 
> png(file="/tmp/tmpzT4H0e.png",width = 800, height = 800)
> tmPlot(myDF,index=c(vars[1],vars[2]), 
+ vSize=vars[4], 
+ vColor=vars[3], 
+ type="value")
Error in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y,  : 
  X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at size 9 could 
not be loaded
Calls: tmPlot ... <Anonymous> -> widthDetails -> widthDetails.text -> grid.Call
In addition: Warning messages:
1: In grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y,  :
  X11 protocol error: BadMatch (invalid parameter attributes)
2: In grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y,  :
  X11 protocol error: BadMatch (invalid parameter attributes)
3: In grid.Call.graphics(L_rect, x$x, x$y, x$width, x$height, 
resolveHJust(x$just,  :
  X11 protocol error: BadMatch (invalid parameter attributes)
4: In grid.Call.graphics(L_rect, x$x, x$y, x$width, x$height, 
resolveHJust(x$just,  :
  X11 protocol error: BadMatch (invalid parameter attributes)
5: In grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y,  :
  X11 protocol error: BadMatch (invalid parameter attributes)
6: In grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y,  :
  X11 protocol error: BadMatch (invalid parameter attributes)
7: In grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y,  :
  X11 protocol error: BadMatch (invalid parameter attributes)
8: In grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y,  :
  X11 protocol error: BadMatch (invalid parameter attributes)
9: In grid.Call.graphics(L_rect, x$x, x$y, x$width, x$height, 
resolveHJust(x$just,  :
  X11 protocol error: BadMatch (invalid parameter attributes)
10: In grid.Call.graphics(L_rect, x$x, x$y, x$width, x$height, 
resolveHJust(x$just,  :
  X11 protocol error: BadMatch (invalid parameter attributes)
Execution halted
______________________________________________
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.

Reply via email to