[R] "ghost" image in .eps file

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue May 18 07:55:18 CEST 2004


I can't see this in your examples: which viewer did you use?  I do see it 
in phantom.ps.

However, looking at resources.bygt.eps, the file is corrupt with a load 
of bytes after 

%%EOF

starting with nulls and then some postscript.  So I don't think this is an
R problem but an OS problem.  (Please see the posting guide about required
background info!) An intelligent viewer will stop at the %%EOF comment.

Please try deleting the file resources.bygt.eps, starting a new R session
and repeating the plot call.


On Mon, 17 May 2004, Andrew Perrin wrote:

> 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
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 
> 

-- 
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




More information about the R-help mailing list