From mcintosh at research.telcordia.com  Fri Oct  8 21:45:09 2004
From: mcintosh at research.telcordia.com (mcintosh@research.telcordia.com)
Date: Fri Oct  8 21:45:13 2004
Subject: [Rd] Bug with png() and plot(type="n") (PR#7270)
Message-ID: <20041008194509.08B3FFC0A@slim.kubism.ku.dk>

Full_Name: Allen McIntosh
Version: 2.0.0
OS: Linux
Submission from: (NULL) (67.80.175.118)


Observed the bug with the following combinations: (RedHat 7.3, R 1.6.0) (RedHat
7.3, R 1.9.1) (Redhat 9, R2.0.0).

In the second plot (.png file) produced by the following sequence:

png(file="x%d.png")
plot(1:10,1:10,main="ooo",type="n")
segments(1:9,1:9,2:10,1:9)
plot(1:10,10:1,main="XXXX",type="n")

the axis labels, the tick marks and the title from the first plot have not been
erased.  The call to segments() seems to be necessary, as does type="n".  The
example I extracted this from also called abline(), which was sufficient to
trigger the bug.  Inserting a call to frame() after the call to segments()
results in an extra file that ought to be blank, but instead contains the
offending text and tick marks.

Workarounds short of multiple calls to png() appreciated.


[Rd] Bug with png() and plot(type="n") (PR#7270)
mcintosh@research.telcordia.com