(PR#1881) polygon() draws non-transparent border, erase.screen draws non-transparent border (PR#1881)

oehl_list@gmx.de oehl_list@gmx.de
Thu, 8 Aug 2002 19:11:05 +0200 (MEST)


> Follow up.  The reason your example does not work is that par("bg") is
> transparent (as the help page warns).  It does work if par(bg="white") is
> set.  Plotting a polygon first fills the whole area, then overplots the
> border (if both cases, for opaque colours).

I GET AN UNDESIRED BLACK BORDER IN ERASE.SCREEN IF par("bg") ==
"transparent".
BUT I just discovered that my replication code does not show what I wanted
to show if R is started newly. 

# THIS IS ADDITIONALLY NEEDED TO SHOW THE PROBLEM
par(bg="transparent")
# without SETTING background color to transparent THE FOLLOWING CODE
# DOES NOT REPLICATE THE BUG
# HAVING par("bg")=="transparent" and SETTING par(bg="transparent") IS NOT
THE SAME

oldpar <- par(no.readonly=TRUE)

par(mar=c(0,0,0,0), oma=c(0,0,0,0))
figs <- rbind(
c( 0.0, 0.5, 0.0, 1.0)  # left
, c( 0.5, 1.0, 0.0, 1.0)  # right
)
dimnames(figs) <- list(
c("left","right" )
, c("xlow","xhigh","ylow","yhigh")
)
screens <- split.screen(figs)

par(usr=c(0, 1, 0, 1))

#plot a box on border of left screen in some color
box(col=5)

# IN R I GET AN UNDESIRED BLACK BORDER HERE
screen(2)

close.screen(all.screens=TRUE)
par(oldpar)


Do you see my problem?
Best 


Jens



> version
         _              
platform i386-pc-mingw32
arch     i386           
os       mingw32        
system   i386, mingw32  
status                  
major    1              
minor    5.1            
year     2002           
month    06             
day      17             
language R






-- 



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._