Skip to content
Prev 310749 / 398502 Next

no y-axis

On 11/13/2012 11:01 PM, Geophagus wrote:
Hi Geo,
I see. Try this:

plot(BE_UK_ABFG$year, BE_UK_ABFG$ammo,
  type="s",
  col= "#DB270F",
  yaxs="i",
  xaxt="n",
  yaxt="n",
  ylim=c(0,5000),
  xlab="",
  ylab="",
  main="Ammo Rep 1885b",
  adj=0,
  las = 1,
  lwd=3,
  bty="n"
  )
abline(h=0:0,  lwd=1, col="black")
abline(h=1000:1000,  lwd=0.3, col="darkgray", lty="dashed")
abline(h=2000:2000,  lwd=0.3, col="darkgray", lty="dashed")
abline(h=3000:3000,  lwd=0.3, col="darkgray", lty="dashed")
abline(h=4000:4000,  lwd=0.3, col="darkgray", lty="dashed")
abline(h=5000:5000,  lwd=0.3, col="darkgray", lty="dashed")
lines (BE_UK_AW$year, BE_UK_AW$ammo, type="s", col= "#826A9F", lwd=3.5)
library(plotrix)
axis(1,at=2007:2010)
axis(2,at=seq(0,5000,by=1000),labels=c("",seq(1000,5000,by=1000)),las=1)
mtext(c(5,10,100),at=c(-150,0,150),line=1,side=2,las=1)
par(xpd=TRUE)
# get rid of the bottom tick
rect(2006.8,-10,2006.87,10,col="white",border=NA)
segments(rep(2006.8,3),c(-150,0,150),rep(2006.88,3),c(5,10,100))
par(xpd=FALSE)

Jim