How to apply cross-hatching to a polygon using the grid graphical system?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Several functions in R's base graphical system, including rect() and polygon() , support cross-hatching via their angle= and density= arguments: x = c(0, 0.5, 1, 0.5) y = c(0.5, 1, 0.5, 0) par(mar=c(0,0,0,0)) plot.new() polygon(x, y, angle=45, density=10) How might I apply similar cross-hatching to a polygon drawn by the grid graphical system's grid.polygon() function: library(grid) grid.newpage() grid.polygon(x,y) I've looked in the documentation for ?grid.polygon and ?gpar , and have skimmed through Paul Murrel's book on R graphics, and