Hi there,

Here is the codes that could demo the problem:

# work as expected
plot(1:5)
polygon(c(1.5, 6.5, 6.5, 1.5), c(1.5, 1.5, 6.5, 6.5), col = "gray")

# the polygon at right upper is not filled by gray with alpha = 0.5
plot(1:5)
polygon(c(1.5, 6.5, 6.5, 1.5), c(1.5, 1.5, 6.5, 6.5), col = adjustcolor("gray", 0.5))

# however, colors with alpha = 0.5 could be used with polygon
polygon(c(1.5, 5.0, 5.0, 1.5), c(1.5, 1.5, 5.0, 5.0), col = adjustcolor("gray", 0.5))

If the polygon is in the plot region(?) wholly, color with alpha works.

Is it designed?

> R.version
               _
platform       x86_64-w64-mingw32
arch           x86_64
os             mingw32
system         x86_64, mingw32
status
major          4
minor          1.1
year           2021
month          08
day            10
svn rev        80725
language       R
version.string R version 4.1.1 (2021-08-10)
nickname       Kick Things

Best,
Jinsong

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to