I believe this to be a trellis problem (or code problem), but couldn't prove
it, and can't find it. Suggestioons would be greatly appreciated. This problem
is probably too unusual to bother with replys to the entire list.
thanks in advance,
bob
S-PLUS : Copyright (c) 1988, 1996 MathSoft, Inc.
S : Copyright AT&T.
Version 3.4 Release 1 for Sun SPARC, SunOS 5.3 : 1996
I'm trying to produce a series of postscript files. Once created the ps files
are converted to epsi prior to importing into a document. Below is listed the
code for 2 of the plots. Both work ok to the stage of producing the ps file,
however, the second must have some small error because the conversion to
epsi bombs. I'm using the gnu(?) tool "ps2epsi" for the conversion and have
never had this problem before.
Even stranger, if I create the second plot on screen with a motif() device,
then print the screen to a ps file (using the Graph Print menu button),
the ps file created will convert to epsi without
problem. If I open the screen device with trellis.device() and do the same
thing, then the ps file will not convert. If I create the ps file via
postscript(...) then the second plot ps file again will not convert.
I could live with the motif() followed by printing the screen image to a file
if I could just change the strip.background$col
pacdf is a moderate sized dataframe
> dim(pacdf)
[1] 94828 51
Create Factors and other setup:
Latfac_factor(cut(pacdf$latitude,breaks=c(-71,-45,0,60)),labels=c("S.O.","S.B.","N.B"))
Zfac_factor(cut(pacdf$pressure,breaks=c(-1,500,1500,2600,7000)),labels=c("Surface","Intermediate","Deep","Bottom"))
ZZfac_ordered(Zfac,levels=c("Bottom","Deep","Intermediate","Surface"))
Upper_pacdf$pressure<=1500
superpose.symbol_trellis.par.get("superpose.symbol")
superpose.symbol$pch[1:4]_"*"
superpose.symbol$cex[1:4]_.5
xlima_c(0,45)
xlimb_c(30,45)
ylima_c(-260,150)
ylimb_c(-260,-120)
Xlab_list("Nitrate (umol/kg)",cex=2)
Ylab_list("Delta C-14 (o/oo)",cex=1.5)
stripstyle_1
superpose.symbol$col[1:4]_c(4,2,6,1)
Plot 1, this one works all the way through:
trellis.device(postscript,color=T,
file="C14vsNitrate.4.ps",
horizontal=T,print.it=F)
xyplot(c14~nitrate|Latfac*ZZfac,data=pacdf,subset=Upper,
layout=c(3,2),
xlab=Xlab,ylab=Ylab,
xlim=xlima,ylim=ylima,
scales=list(cex=1.25),
par.strip.text=list(cex=1),
strip=function(...) strip.default(...,style=stripstyle),
groups=ZZfac,
pch=superpose.symbol$pch[1:4],
col=superpose.symbol$col,
cex=superpose.symbol$cex,
panel=panel.superpose)
dev.off()
Plot 2, this one makes the ps file (and gs will open it without complaint)
but "ps2epsi C14vsNitrate.3.ps" bombs (error list given below)
trellis.device(postscript,color=T,
file="C14vsNitrate.3.ps",
horizontal=T,print.it=F)
xyplot(c14~nitrate|ZZfac,data=pacdf,subset=Upper,
layout=c(1,2),aspect=1,
xlim=xlima,ylim=ylima,
scales=list(cex=1.25),
xlab=Xlab,ylab=Ylab,
par.strip.text=list(cex=1),
strip=function(...) strip.default(...,style=stripstyle),
groups=ZZfac,
pch=superpose.symbol$pch[1:4],
col=superpose.symbol$col,
cex=superpose.symbol$cex,
panel=panel.superpose)
dev.off()
ERROR listing:
% ps2epsi C14vsNitrate.3.ps
Error: /rangecheck in --getinterval--
Operand stack:
(\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\370\000\000\000\007\370\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)
0 63
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push --nostringval-- 2 3 %oparray_pop
--nostringval-- --nostringval-- false 1 %stopped_push 1 3
%oparray_pop .runexec2 --nostringval-- --nostringval-- --nostringval--
2 %stopped_push --nostringval-- --nostringval-- --nostringval--
--nostringval-- false 1 %stopped_push --nostringval--
--nostringval-- --nostringval-- --nostringval-- 239 1 549
--nostringval-- %for_pos_int_continue --nostringval-- --nostringval--
--nostringval--
Dictionary stack:
--dict:907/941(G)-- --dict:0/20(G)-- --dict:53/200(L)--
--dict:39/47(L)-- --dict:112/150(L)-- --dict:39/47(L)--
Current allocation mode is local
Current file position is 96694
Aladdin Ghostscript: Unrecoverable error, exit code 1
|