Skip to content

graphics output produces corrupt/empty files

4 messages · Ott Toomet, Martin Schmettow, Peter Dalgaard +1 more

#
Hi,

can you please describe what did you do exactly?  Which commands did
you use in order to redirect the output to a file?

It sound like you have forgotten to call dev.off().
Look ?dev.off

Ott

 | Date: Tue, 15 Apr 2003 16:53:32 +0200
 | From: Martin Schmettow <martin.schmettow at bibliothek.uni-regensburg.de>
 | 
 | Hi there.
 | 
 | as a newbie I figured out the basics of R but when it came to graphic 
 | output it was a bad surprise.
 | All but the X11 device do not function properly. Most of them generate 
 | an empty file and pdf() produces non valid output (gs and acroread as well).
 | Very annoying, because I have to write a report.
 | I got the recent stable binary rpm (v1.6.2) from CRAN on a SuSE Linux 8.1.
 | Any help?
 | 
 | CU
 | Martin.
#
Hi there.

as a newbie I figured out the basics of R but when it came to graphic 
output it was a bad surprise.
All but the X11 device do not function properly. Most of them generate 
an empty file and pdf() produces non valid output (gs and acroread as well).
Very annoying, because I have to write a report.
I got the recent stable binary rpm (v1.6.2) from CRAN on a SuSE Linux 8.1.
Any help?

CU
Martin.
#
Martin Schmettow <martin.schmettow at bibliothek.uni-regensburg.de> writes:
Don't forget dev.off() when you're finished plotting; the file I/O is
buffered. Or plot to X11 and use dev.copy2eps(file="foo.eps").
#
On Tue, 2003-04-15 at 15:53, Martin Schmettow wrote:
Hi

After producing your file with pdf() you have to do dev.off()

pdf("file")
plot(...)
dev.off()

Have you done it ?

Regards

EJ