Skip to content
Prev 361199 / 398506 Next

Scale y-labels based on a value with 'lattice'

Hi Kimmo,
I was unable to work out how to do this in lattice, but this might help:

kedf<-read.table(text="Group.1    Group.2     x Freq
 deutschland  achtziger  2.00    1
 deutschland        alt  1.25    4
 deutschland     anfang -2.00    1
 deutschland    ansehen  1.00    2
 deutschland     arbeit  0.50    2
 deutschland arbeitslos -2.00    1",header=TRUE)

par(mar=c(5,7,4,2))
dotchart(kedf$x)
mtext(kedf$Group.2,side=2,at=1:6,line=0.5,
 las=2,cex=log(abs(kedf$Freq))+1)

Jim
On Fri, May 27, 2016 at 12:51 AM, K. Elo <maillists at pp.inet.fi> wrote: