Displaying 2 results from an estimated 2 matches for "dualplot".
Did you mean:
dualplot4
2011 Jul 04
1
superimposing different plot types in lattice panel.superpose
...))
modelresults<-data.frame(x,y,model)
#generate test "data"
x<-c(2,5,8)
y<-rep(1.5,3)
model<-c("a","b","c")
data<-data.frame(x,y,model)
#combine them into one data set
combined<-make.groups(modelresults,data)
#custom panel function
panel.dualplot <- function(...) {
panel.xyplot(x[which="modelresults"],y[which="modelresults"],...)
panel.points(x[which="data"],y[which="data"],...)
}
#main call to xyplot
xyplot(y ~ x, data=combined,
type = "l",
panel = panel.superpose,
groups = m...
2002 Dec 17
3
Changing "..." inside a function: impossible? desirable?
This is was something like a request for your comments, thoughts
on the topic...
Many of you will know that the "..." (aka \dots) argument is
very useful for passing ``further graphical parameters'',
but can be a pain when itself is passed to too many plotting
functions inside your own function.
An artificial example being
myplot <- function(x,y, ...) {
plot(0:1, 0:1,