Sample data/example:
x <- log(seq(1,11,1))
y <- seq(0,1,0.1)
plot <- xyplot(y~x, type="l")
update(plot, panel = function(...) {
panel.xyplot(...)})+as.layer(xyplot(y[3]~x[3], type=c("p"), lwd=3, cex=3, pch=3))
Now, lets say that I have a new measurement of point where my function x outputs value above the 2.5, something like number 10. I have to keep the initial plot axis at y=0:1 and x=0:2,5.
How can I show graphically that the value is outside its range to plot? Its there a way to tell/show that the value 10 exists?
I just thought about this:
ifelse(x > 2.5, 2.5)
which would bring the value 10 to 2,5 and draw the point at the end of the function x. Is there a way to "draw" - show outliers?
The real case is more complicated so hence this simplification. Hint as to where to look would be also helpful.
EDIT: Solution posted by TWL gave me hint within lattice:
tp <- sprintf("+ outlier")
mypanel<-function(x,y,...){
panel.xyplot(x, y, ...)
panel.text(2,1,labels=tp,cex=1.5,col="red")}
xyplot(y~x, type="l", panel=mypanel)