polygon():draw the polygons where vertices are given in x and y.

polygon(x,y=NULL,density=NULL,angle=45,border=NULL,col=NA,lty=par("lty"),...,fillOddEven=FALSE)

·density:the density of shading lines,in lines per inch.

              缺省值指没有画shading lines。

·angle:shading lines的角度,用度数值来表示。

·col:填充颜色。

·border:画边界的颜色。

·fillOddEven:logical controlliing the polygon shading mde.

例1:

> par(mfrow=c(1,3))
> x<-mtcars$mpg
> plot(x)
> polygon(x)
>  >
plot(x,col="yellow")> polygon(x,col="blue") >
> plot(x,col="red") > polygon(x,col="yellow",border="green")

polygon()函数

例2:

plot(c(1,9),1:2,type="n")
> polygon(1:9,c(2,1,2,1,NA,2,1,2,1),density=c(10,10),angle=c(-45,45))

polygon()函数

 

 

 

 

 

 

 
                    
            
                

相关文章:

  • 2021-06-11
  • 2022-12-23
  • 2018-06-14
  • 2022-03-08
  • 2021-12-26
  • 2021-04-10
  • 2021-11-02
  • 2021-10-27
猜你喜欢
  • 2021-11-04
  • 2021-12-09
  • 2021-06-09
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案