Just a suggestion: After displaying the graph on the screen, have you tried
saving the graph to file (from the menu, File -> Save As -> ...) to see if
files saved this way behaved similarly?
At 05:14 PM 10/24/2003 -0400, Paul, David A wrote:>R1.8.0, Win2k:
>
>When I run the code
>
>lset( list( background = list(col = "white")))
>xyplot
>(
> y ~ TIME , data = foo.frame,
> scales = list(alternating = FALSE),
> ylim = c(.75,y.max),
> panel = function(x, y, panel.number, ... )
> {
> panel.superpose(x = foo.frame$TIME[foo.frame$group == 1],
> y = foo.frame$y[foo.frame$group == 1],
> subscripts = TRUE,
> groups = foo.frame$subject.id[foo.frame$group == 1],
> type = 'b',
> col = "black",
> lwd = 4,
> cex = 1.5)
>
> panel.superpose(x = foo.frame$TIME[foo.frame$group == 0],
> y = foo.frame$y[foo.frame$group == 0],
> subscripts = TRUE,
> groups = foo.frame$subject.id[foo.frame$group == 0],
> type = 'l',
> col = gray(.6))
>
> panel.loess(x = foo.frame$TIME,
> y = foo.frame$y, col = gray(.2),
> lwd = 3,
> lty = 5,
> span = 1/3)
> }
>)
>
>I get the desired graph on the screen. Basically,
>I am trying to display the time course of a set of test
>subjects, where each of two subsets is displayed in a
>different color, and a loess smoother is added to the plot
>for reference.
>
>When I add
>
>trellis.device(postscript,
> file = "//.../foo_status.ps",
> color = TRUE)
>
>to the beginning of this little script, upon trying to open the
>created file with Ghostview/Ghostscript, I get an error dialog
>box containing the error message in the attached text file and
>nothing is displayed.
>
>If I change to
>
>trellis.device(win.metafile,
> file = "//.../foo_status.wmf",
> width = 8.5, height = 6.25)
>
>I am able to view the created file, but there are unwanted
>vertical lines drawn at max(foo.frame$TIME). Moreover, MSWord
>has a hard time rendering this graph in a stable way, as it
>is constantly redrawing it and freezing my screen. The file
>is only 35K, so this should not happen. I tried the same
>scripting options in R1.7.1 with the same results, which leads
>me to believe that my xyplot(..) code could be in error.
>OTOH, this is a fairly simple adaptation of some earlier
>working code and the within-RGui graph appears to be fine and
>doesn't have the unwanted vertical lines. When I right-click
>on this graph and try to paste it directly into MSWord, I
>get the same "screen freeze" issues, and the vertical lines
>appear in the window.
>
>Any help would be greatly appreciated.
>
>
>-david paul
>
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://www.stat.math.ethz.ch/mailman/listinfo/r-help