R GUI dies using postcript() in Windows XP Pro
What do you think font.main=16 does? postscript() only has 5 fonts. Fortunately your example also crashes on Linux so was fairly easy to track down. The windows devices do have more fonts (19 by default).
On Thu, 18 Dec 2003, Gavin Simpson 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 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()
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595