Skip to content
Prev 255545 / 398506 Next

lattice xscale.components: different ticks on top/bottom axis

Deepyan,

Thank you very much for your reply.  It makes things a bit clearer.  

It other words in the list prepared by xscale.components(), vectors <top|bottom>$ticks$at and <top|bottom>$labels$at must be the same.  If only every second tick is to be labelled then every second label should be set explicitly to empty strings:

  ans$bottom$ticks$at <- seq(0,10,by=1)
  ans$bottom$labels$at <- seq(0,10,by=1)
  ans$bottom$labels$labels <- paste("B",seq(0,10,by=1),sep="-")
  # replace  "B-1", "B-3", ... with ""
  ans$bottom$labels$labels[seq(2,11,by=2)] <- ""

Sincerely,
Boris.