Skip to content
Prev 244369 / 398506 Next

how to add these

On 2010-12-08 12:24, casperyc wrote:
[....snip....]
You could do something like this (I'm pretty sure that
there's something like it in the R-help archives):

  plot(p, g1, type='n', ylim=c(-5,5),
    las=1, ann=FALSE, axes=FALSE)

## use the 'pos' argument to position the axis:
  axis(2, pos=0.5)
  abline(v=0.5)
  axis(1, pos=0)
  abline(h=0)

## now add a second horizontal axis; you have to
## do this twice; once for ticks and once for labels
  axis(1, pos=0, tck=.02, lab=NA, at=c(.1,.3,.6,.9))
  axis(1, pos=1.2, tick=FALSE, lab=letters[1:4], at=c(.3,.6,.9))

## now add your lines

Peter Ehlers