[R] "ghost" image in .eps file

Andrew Perrin clists at perrin.socsci.unc.edu
Mon May 17 18:03:56 CEST 2004


Greetings-

An odd situation has developed. I use the following code to create .eps
files of two very similar graphs:

postscript(file='resources.bygt.eps', onefile=FALSE, horizontal=TRUE)
barplot(resources.bygt.matrix,
        beside = TRUE,
	legend.text=c('narrative','doubt'),
	names.arg=c('business','catholic','protestant','sports','union'),
	density=1:2*10,
	col=1,
	horiz=TRUE)
dev.off()

postscript(file='logics.bysc.eps', onefile=FALSE, horizontal=TRUE)
barplot(logics.bysc.matrix,
        beside = TRUE,
	legend.text=c('morality','interests','capacity'),
	names.arg=c('airport','chemco','halfin','profile'),
	density=1:3*10,
	col=1,
	horiz=TRUE)
dev.off()

The second of these works fine. However, the first (resources.bygt.eps)
contains a "ghost" image of a different graph. When I include this in a
LaTeX file, the resulting document has the ghost graph superimposed upon
the real graph.  When I use gv to see the graph, clicking the "redisplay"
button causes the ghost graph to appear.

Any idea why this is happening?

Environment is:
R : Copyright 2003, The R Foundation for Statistical Computing
Version 1.8.1  (2003-11-21), ISBN 3-900051-00-3


Both .eps files are in http://perrin.socsci.unc.edu/stuff for your
information.

Thanks for any advice.

----------------------------------------------------------------------
Andrew J Perrin - http://www.unc.edu/~aperrin
Assistant Professor of Sociology, U of North Carolina, Chapel Hill
clists at perrin.socsci.unc.edu * andrew_perrin (at) unc.edu




More information about the R-help mailing list