[R] R GUI dies using postcript() in Windows XP Pro

Duncan Murdoch dmurdoch at pair.com
Thu Dec 18 19:17:54 CET 2003


On Thu, 18 Dec 2003 18:02:07 +0000, Gavin Simpson
<gavin.simpson at ucl.ac.uk> wrote :

>Dear List,
>
>My colleague has been having a problem with the following data and 
>plotting commands. The example below is part of a larger set of plots, 
>but I've isolated the problem to this example using this small dataset 
>(below), which kills rgui consistently. My version info
>
> > version
>          _
>platform i386-pc-mingw32
>arch     i386
>os       mingw32
>system   i386, mingw32
>status
>major    1
>minor    8.0
>year     2003
>month    10
>day      08
>language R
>
>But this also happens in 1.8.1 on Windows XP Pro

I just tried it in 1.8.1, Win XP Pro, with no error, then tried in a
relatively recent build of r-patched and saw the crash.  I'll see if I
can track it down.

Duncan Murdoch
>
>The code seems to stop at the call to plot() in the code below, and then 
>MS's error reporting window pops up and informs us that rgui has been 
>closed.
>
>Note that the same code, but without the postcript() and dev.off() 
>commands works as expected to produce the plot on a windows device.
>
>Any ideas as to what is going on?
>
>All the best,
>
>Gav
>
>#code to run to reproduce the problem
>year <- c(1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 
>1998, 1999, 2000, 2001, 2002)
>
>avgMsr <- c(10.800000, 7.000000, 6.200000, 9.571429, 10.800000, 
>11.600000, 10.200000, 11.400000, 7.200000, 9.400000, 11.200000, 
>11.600000, 11.600000, 8.000000, 7.600000)
>
>totMsr <- c(19, 17, 13, 24, 17, 17, 21, 18, 13, 15, 19, 18, 21, 15, 11)
>
>postscript(file="invert.eps", onefile=FALSE, horizontal = FALSE, 
>pointsize = 8)
>
>op <- par(mar = c(3,4,1.5,1)+0.1,font.main=16,tcl=-0.2)
>plot(x = year, y = avgMsr, ylab = "Species richness", main = "Loch Coire 
>nan Arr", axes = FALSE, ylim = c(0,25), xlim = c(1988,2002))
>axis(2, las=1)
>axis(1)
>lines(x = year, y = avgMsr)
>points(x = year, y = totMsr , col = "black", pch = 19, type = "o")
>lines(x = year, y = totMsr)
>box()
>par(op)
>dev.off()




More information about the R-help mailing list