## This is a small example.
## See ?plot.likert for the complete example including motivation.
## 
require(grid)
require(lattice)
require(latticeExtra)
require(HH)
data(ProfChal)
Empl <- ProfChal[[2]]
pct   <- likert(Empl, as.percent="noRightAxis", xlab="Percent")
pct
count <- likert(Empl, rightAxis=TRUE,
                xlab="Count", ylab.right="Row Count Totals",
                scales=list(x=list(at=c(0, 100, 200))))
count
countEmptied <- HH:::emptyMainLeftAxisLeftStripBottomLegend(count)
countEmptied
tmp <- update(resizePanels(c(pct, countEmptied, y.same=TRUE), w=c(.8, .2)),
              scales=list(y=list(alternating=3)),
              between=list(x=1))
tmp$y.limits <- count$y.limits
tmpRun the code above in your browser using DataLab