'Is there a way to make angle lines and border lines of `polygon()` of different linewidth?

It seems that, in polygon(), lwd will change the linewidth of both borders and the angle lines. Is there a way to control them separately without calling polygon() twice?



Solution 1:[1]

suggestion:

polygon(
    ## repeat x and y coordinates = two conformal polygons
    rep(c(0,1,.5,0),2),
    rep(c(0,0,1,0),2),
    angle = 45, density = 10,
    ## vector of line widths, one per polygon
    lwd = c(5,1)
)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 I_O