[R] Postscript Legends (or not)

Anon. bob.ohara at helsinki.fi
Thu Jun 22 14:04:43 CEST 2000


I discovered a little problem when using the Windows NT release of R
1.0.1, and it's still there in R 1.1.0.

The boiled down version is this:  I want to draw the following plot and
put it into a Postscript file:

x <- c(1,2,3,4); y1 <- c(1,2,3,4); y2 <- c(2,2,2,2)
Fred <- c(1,2)

postscript(file="d:/Bob/Papers/IFM/try2.ps")
plot(x,y1, type="l")
lines(x,y2,lty="33")
legend(1,4, c("y1","y2"), lty=Fred)
graphics.off()

This works fine.  However, if I use Fred <- c(1,"33"), I get an error
when trying to view hte file (using either Ghostscript or CorelDraw). 
GhostScript gives me the message that I've included below.

Is this a bug, or am I missing something?  

Bob


Oh yes, this is the GS message:

Loaded Ghostscript DLL C:\gstools\gs5.50\gsdll32.dll
Aladdin Ghostscript 5.50 (1998-9-11)
Copyright (C) 1998 Aladdin Enterprises, Menlo Park, CA.  All rights
reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Displaying DSC file D:/Bob/Papers/IFM/try2.ps
Displaying page 1
Loading NimbusSanL-Regu font from
C:\gstools\gs5.50\fonts\n019003l.pfb... 1883690 574525 1329174 41921 1
done.
Loading NimbusSanL-Bold font from
C:\gstools\gs5.50\fonts\n019004l.pfb... 1923870 607231 1329174 44133 1
done.
Loading NimbusSanL-ReguItal font from
C:\gstools\gs5.50\fonts\n019023l.pfb... 1964050 641418 1329174 46118 1
done.
Loading NimbusSanL-BoldItal font from
C:\gstools\gs5.50\fonts\n019024l.pfb... 1984140 672771 1349264 51419 1
done.
Loading StandardSymL font from C:\gstools\gs5.50\fonts\s050000l.pfb...
2024320 710401 1349264 53445 1 done.
Unrecoverable error: rangecheck in setdash
Operand stack:
    0  --nostringval--

--- Begin offending input ---

--- End offending input ---
file offset = 4285
gsdll_execute_cont returns -15



-- 
Bob O'Hara
Metapopulation Research Group
Division of Population Biology
Department of Ecology and Systematics
PO Box 17 (Arkadiankatu 7)
FIN-00014 University of Helsinki
Finland

tel: +358 9 191 7382  fax: +358 9 191 7301 
email: bob.ohara at helsinki.fi
To induce catatonia, visit:
http://www.helsinki.fi/science/metapop/

I have yet to see any problem, however complicated, which, when you
looked at it in the right way, did not become still more complicated.  -
Poul Anderson
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list