[R] barplot
bets
elisvb at hotmail.com
Wed May 23 13:34:22 CEST 2012
Hey,
I am trying to create barplot of abundances over time (in days). The period
is over 171 days, so I don't want to have all labels there but only the
first day of the month. I couldn't find anything like this on the forum yet.
Mostrly it's about year to year data.
This is the relevant part of my table:
datum month abundance
26/03/11 March 1
27/03/11 March 0
28/03/11 March 1
29/03/11 March 0
30/03/11 March 0
31/03/11 March 0
1/04/11 April 0
2/04/11 April 0
3/04/11 April 0
...
9/09/11 September 1
I tried making a sequence:
hatch$axis.ticks2=seq(from=hatch$datum[1],to=hatch$datum[171], by=30)
But this sequence is too short to use the names.arg function.
Next, I tried more ideas from this forum that might work. But the best I got
was by just replacing the day by a month and reducing the size of the
tickmarks. Or by blanking excessive labels in R commander. But this is
really poor substitute of what I actually want. Furthermore, in the end I
want the labels vertical to match other graphs (las=2), but when doing that
my labels become so dense it's basically one black blur.
bar=barplot(abundance, col="black",xlab="", ylim=c(0,120), axisnames=T,
ylab="Total fish",axis.lty=1)
axis(1,at=bar, tcl=-0.01, las=1,lab=hatch$month,cex.axis=0.8)
I hope I made my problem clear.
Thank you.
--
View this message in context: http://r.789695.n4.nabble.com/barplot-tp4631070.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list