Displaying 2 results from an estimated 2 matches for "mypanelfn".
Did you mean:
mypanel
2008 May 13
0
add horizontal line "(ABLINE(V=))" to xyplot lattice
...lines=T,title="Blm factor",cex.title=0.7,
> cex=0.7,corner=c(1,1)),main="Mangroves target=1573ha",layout=c(2,3))
>
> I would like to add a horizontal line to each one of the 5 graphs
> with a single value, v=1573
Try using a custom panel function, something like:
mypanelfn <- function(x,y,...)
{
panel.xyplot(x=x, y=y, ...)
grid.lines(c(0,1), unit(rep(1573, 2), "native")
}
xyplot(<your params>, panel=mypanelfn)
You can also try using llines instead of grid.lines.
Regards,
Richie.
Mathematical Sciences Unit
HSL
-----------------------------...
2008 Sep 23
5
xyplot problem
Hi all,
I am trying to produce some panels with dots in an X/Y plane where the
diameter of the dots indicates a Z value (like e.g. earthquake maps where dot
sizes indicate magnitudes and X/Y the location).
This works fine with xyplot, e.g.:
xyplot(1:3~1:3,cex=1:3,pch=16)
However, when I do this with a panel variable, e.g.:
x<-rep(1:3,5)
y <- rep(1:3,5)
sz <- rep(1:5,each=3)
grp