Displaying 3 results from an estimated 3 matches for "oltc".
Did you mean:
oftc
2013 Feb 15
3
lattice 3x3 plot: force common y-limits accross rows and align x-axes
...subjectx variables
# for later re-use in panel labels
df.irisk$subjectx <- df.irisk$subject[,drop=TRUE]
df.irisk$subjectx <- reorder(df.irisk$subjectx,df.irisk$count,sum)
assign(paste('sbjx.',irisk,sep=''),levels(df.irisk$subjectx))
# create dotplot and store it in oltc.{irisk} variable
oltc.irisk <- dotplot(subjectx~count|treatment,data=df.irisk,
layout=c(3,1),type=c('p','h'),
xlim=c(-1,16),origin=0,
xlab="",ylab="")
assign(paste('oltc.',iris...
2011 Mar 10
3
lattice xscale.components: different ticks on top/bottom axis
...<- seq(0,10,by=2)
ans$bottom$labels$labels <- paste("B",seq(0,10,by=2),sep="-")
# - top labels
ans$top$labels$at <- seq(1,9,by=2)
ans$top$labels$labels <- paste("T",seq(1,9,by=2),sep="-")
# return axes definition list
return(ans)
}
oltc <- xyplot(y~x,data=df,
scales=list(x=list(limits=c(0,10),at=0:10,alternating=3)),
xscale.components=xscale.components.A,
user.value=1)
print(oltc)
The code generates a figure with incorrectly placed bottom and top
labels. Bottom labels "B-0", "B-2...
2011 Jan 25
1
lattice draw.key(): position of key in panels
...ot(...)
# create key-list
pnlid <- panel.number()
lbl <- ifelse(pnlid==1,"AA","BB")
pts <- Rows(trellis.par.get("superpose.symbol"),pnlid)
key <- list(points=pts,text=list(lbl),x=0.1,y=0.9,corner=c(0,1))
# draw key
draw.key(key,draw=TRUE)
}
oltc <- xyplot(y~x|type,data=df,panel=panel.xyplot.x)
print(oltc)
I tried using 'vp=current.viewport()' in the call to draw.key() but it
did not help. Can anybody suggest the proper way to specify position of
the key-list so that it is respected by draw.key() when called within a
panel func...