Displaying 5 results from an estimated 5 matches for "bebebe80".
2016 Aug 03
2
polypath winding rule with transparency
...polypath() on Windows
when using the "winding" rule
## overlapping, both clock-wise
x <- cbind(c(.1, .1, .6, .6, NA, .4, .4, .9, .9),
c(.1, .6, .6, .1, NA, .4, .9, .9, .4))
pfun <- function() {
plot(x)
polypath(x * 0.8 + 0.2, rule = "winding", col = "#BEBEBE80")
polypath(x, rule = "winding", col = "#BEBEBE80")
}
## output "windows.png/pdf" or "unix.png/pdf"
label <- .Platform$OS.type
png(sprintf("%s.png", label))
pfun()
dev.off()
pdf(sprintf("%s.pdf", label))
pfun()
dev.off()
Visu...
2016 Aug 04
2
[FORGED] Re: polypath winding rule with transparency
...ied), and the NAs in 'x' generate two
separate polygons, which get drawn one on top of the other.
The correct analogy to the polypath() example is ...
x2 <- matrix(x[!is.na(x)], ncol=2)
grid.path(x2[,1], x2[,2], id=rep(1:2, each=4),
rule="winding", gp=gpar(="#BEBEBE80"))
... which produces the same (wrong) result as polypath() on Windows.
Also, the grid.path() result for your example is NOT the same as the
correct result; we do NOT want a separate shade for the intersecting
region when the "winding" fill rule is working correctly. The fill...
2017 Apr 24
1
polypath winding rule with transparency
...ate polygons, which get drawn one on top of the other.
>>
>> The correct analogy to the polypath() example is ...
>>
>> x2 <- matrix(x[!is.na(x)], ncol=2)
>> grid.path(x2[,1], x2[,2], id=rep(1:2, each=4),
>> rule="winding", gp=gpar(="#BEBEBE80"))
>>
>> ... which produces the same (wrong) result as polypath() on Windows.
>>
>> Also, the grid.path() result for your example is NOT the same as the
>> correct result; we do NOT want a separate shade for the intersecting
>> region when the "winding...
2016 Aug 04
0
[FORGED] Re: polypath winding rule with transparency
...generate two
> separate polygons, which get drawn one on top of the other.
>
> The correct analogy to the polypath() example is ...
>
> x2 <- matrix(x[!is.na(x)], ncol=2)
> grid.path(x2[,1], x2[,2], id=rep(1:2, each=4),
> rule="winding", gp=gpar(="#BEBEBE80"))
>
> ... which produces the same (wrong) result as polypath() on Windows.
>
> Also, the grid.path() result for your example is NOT the same as the
> correct result; we do NOT want a separate shade for the intersecting
> region when the "winding" fill rule is work...
2016 Aug 03
0
polypath winding rule with transparency
...e is sufficient to demonstrate the problem in Windows.
## overlapping, both clock-wise
x <- cbind(c(.1, .1, .6, .6, NA, .4, .4, .9, .9),
c(.1, .6, .6, .1, NA, .4, .9, .9, .4))
## only a problem on Windows windows() and png()
plot(x);polypath(x, rule = "winding", col = "#BEBEBE80")
This code shows the same behaviour on different systems/devices.
## no problem on Windows/Linux/PNG/PDF ...
library(grid)
grid.newpage()
pushViewport(viewport(0.5, 0.5, width = 1, height = 1))
grid.draw(pathGrob(x[,1], x[,2], rule = "winding", gp = gpar(fill =
"#BEBEBE80&quo...