Skip to content
Prev 280791 / 398503 Next

Axis manipulation in Stackpoly (Plotrix)

On 12/23/2011 07:52 AM, Ben Neal wrote:
Hi Ben,
In the stackpoly function, you can specify the positions of the axis 
ticks (xat=...) and the labels for those positions (xaxlab=...). You 
don't seem to have supplied the "x" values, so the values in CaribMatrix 
will be placed display at 1:dim(CaribMatrix)[1]. I'll have to make up 
CaribMatrix...

CaribMatrix<-matrix(order(sample(200:500,579,TRUE),nrow=579,ncol=3)
stackpoly(CaribMatrix,stack=TRUE,ylim=c(0,1500),xat=seq(1,600,by=50),
  xaxlab=seq(1450,2000,by=50),staxx=TRUE)

This seems to give a reasonable plot for me.

Jim