[R] problem with postscript output of R-devel on Windows

Kimpel, Mark William mkimpel at iupui.edu
Thu Aug 31 21:51:41 CEST 2006

I apologize for my previous confusing example. Below is some sample
code, taken directly from the "image" help file, that reproduces a
postscript problem. This now happens with both R 2.3.1 and R 2.4

What I get appears to be output of only certain postscript "objects", to
use an Adobe term. When I use the R GUI menu to "save as", jpeg and pdf
files save correctly, but the postscript file does not. I am not getting
any axis labels or topo labels. This is true whether I import the PS
file into either Photoshop or Illustrator.

Thanks, Mark

x <- 10*(1:nrow(volcano))
     y <- 10*(1:ncol(volcano))
     image(x, y, volcano, col = terrain.colors(100), axes = FALSE)
     contour(x, y, volcano, levels = seq(90, 200, by = 5),
             add = TRUE, col = "peru")
     axis(1, at = seq(100, 800, by = 100))
     axis(2, at = seq(100, 600, by = 100))
     title(main = "Maunga Whau Volcano", font.main = 4)

> sessionInfo()
Version 2.3.1 (2006-06-01) 

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

Mark W. Kimpel MD 


(317) 490-5129 Work, & Mobile


(317) 663-0513 Home (no voice mail please)

1-(317)-536-2730 FAX

-----Original Message-----
From: Duncan Murdoch [mailto:murdoch at stats.uwo.ca] 
Sent: Thursday, August 31, 2006 12:52 PM
To: Kimpel, Mark William
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] problem with postscript output of R-devel on Windows

On 8/31/2006 11:27 AM, Kimpel, Mark William wrote:
> I have developed a problem with the postscript output of plot on
Windows. My code still works properly with R 2.3 but, with R 2.4, the
white text on red background does not show up. It does, however, show up
when output is sent to the screen. Below is my code and sessionInfo.
> R version 2.4.0 Under development (unstable) (2006-08-29 r39012) 
> i386-pc-mingw32 
> locale:
> LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
> attached base packages:
> [1] "splines"   "tools"     "methods"   "stats"     "graphics"
"grDevices" "utils"     "datasets" 
> [9] "base"     
> other attached packages:
>   Rgraphviz geneplotter         XML     GOstats    Category
hgu95av2        KEGG    multtest      xtable 
>    "1.11.9"    "1.11.8"    "0.99-8"     "1.6.0"     "1.4.1"
"1.12.0"     "1.8.1"    "1.11.2"     "1.3-2" 
>        RBGL    annotate          GO       graph       Ruuid
limma  genefilter    survival     rat2302 
>     "1.8.1"    "1.11.5"     "1.6.5"   "1.11.13"    "1.11.2"
"2.7.9"    "1.11.8"      "2.28"    "1.12.0" 
>        affy      affyio     Biobase 
>    "1.11.6"     "1.1.8"   "1.11.29"
> fileName<-paste(experiment, contrast, "FDR", FDR, "Graph", "ps",
>     postscript(file=fileName, paper="special",width=width,
height=height) #set up graphics device
>     plot(result.gN, layout.param, nodeAttrs = nAttrs, edgeAttrs =
>         main=paste(paste("Experiment:", experiment, ";  Contrast:",
contrast,";  FDR:", FDR, sep=""), paste("Min. connections ==",
min.edges, "Min. citations per connection ==", min.cites, "Additional
search criteria:",
>             termAdditional, sep=" "), sep="    "))

Could you put together a reproducible example to illustrate the problem?

  We don't have all the variables used in that example.  I think you 
should be able to do it with just base packages attached; if not, it's 
likely a problem with one of the contributed packages, rather than with

Duncan Murdoch

More information about the R-help mailing list