[R] Axis manipulation in Stackpoly (Plotrix)
bneal at spg.ucsd.edu
Fri Dec 23 19:29:05 CET 2011
Thank you. That helps me understand the issue better. I came up with a similar solution . . . but yours is more elegant (I just wrote out the labels . . ).
My solution follows:
stackpoly(CaribMatrix, stack=TRUE, xlab="Year",ylab="Catch in tons",
xaxlab=c(1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000))
From: Jim Lemon [mailto:jim at bitwrit.com.au]
Sent: Fri 12/23/2011 2:53 AM
To: Ben Neal
Cc: r-help at r-project.org
Subject: Re: [R] Axis manipulation in Stackpoly (Plotrix)
On 12/23/2011 07:52 AM, Ben Neal wrote:
> Have made a stacked area plot, but now want to manipulate the x axis: make in even increments (50) in order to suppress the tick marks (forming solid bar under plot). However, the plot functions do not seem to work, and I cannot find documentation for use of xat in stackpoly.
> This is a time series of data covering 579 years, and has been successfully converted from zoo to matrix. Data plotting fine, jsut want to change axis -
> stackpoly(CaribMatrix, stack=TRUE, xlab="Year",ylab="Catch in tons", xaxlab=(1250:2008),
> main="Historical Florida reef fisheries catch by sector", axis4="FALSE")
> Any assistance appreciated! Thanks very much, Benjamin P Neal, Scripps Inst. of Oceanogrpahy
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). I'll have to make up
This seems to give a reasonable plot for me.
More information about the R-help