Grayscale stacked area plot in R
I am plotting a stacked area plot in 开发者_StackOverflowR using the stackpoly()
command in the plotrix package. The default colors are glaring, to say the least. Is there any way to use symbols or grayscale instead?
From ?stackpoly
:
col: Color to fill the polygons. If NULL, ‘rainbow’ will be called
to generate the colors. If NA, the polygons will not be
filled.
Slightly modifying the example in ?stackpoly
:
stackpoly(matrix(cumsum(testx),nrow=10),main="Test Stackpoly I",
xaxlab=c("One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten"),
border="black",staxx=TRUE,
col=gray(seq(0.1,0.9,length=10)))
精彩评论