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() -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Gavin Simpson [T] +44 (0)20 7679 5522 ENSIS Research Fellow [F] +44 (0)20 7679 7565 ENSIS Ltd. & ECRC [E] gavin.simpson at ucl.ac.uk UCL Department of Geography [W] http://www.ucl.ac.uk/~ucfagls/cv/ 26 Bedford Way [W] http://www.ucl.ac.uk/~ucfagls/ London. WC1H 0AP. %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
The font.main = 16 in par() is having problems cooperating with pointsize = 8 in postscript(). One of them has to go and then the code is happy. This is probably a feature. HTH, Andy -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Gavin Simpson Sent: Thursday, December 18, 2003 11:02 AM To: R-Help Subject: [R] R GUI dies using postcript() in Windows XP Pro 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() -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Gavin Simpson [T] +44 (0)20 7679 5522 ENSIS Research Fellow [F] +44 (0)20 7679 7565 ENSIS Ltd. & ECRC [E] gavin.simpson at ucl.ac.uk UCL Department of Geography [W] http://www.ucl.ac.uk/~ucfagls/cv/ 26 Bedford Way [W] http://www.ucl.ac.uk/~ucfagls/ London. WC1H 0AP. %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% ______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
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 ProI 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()
Prof Brian Ripley
2003-Dec-18 18:20 UTC
[R] 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
Maybe Matching Threads
- Re: [R] R GUI dies using postcript() in Windows XP Pro (PR#5910)
- glht after lmer with "$S4class-" and "missing model.matrix-" errors with DATA
- Animal Morphology: Deriving Classification Equation with Linear Discriminat Analysis (lda)
- perform Kruskal-Wallis test without using the built-in command in R
- Postcript font size