The following produces a scatterplot with rugs on both the vertical and horizontal axes.
library(dplyr) library(stringr) library(lattice) library(latticeExtra) ## ..... xyplot(scheduleInterval ~ calledForApptDate, data = dd.2, xlab = "Date patient called for appointment", ylab = "Days in the future that patient was scheduled", panel = function(...) { panel.xyplot(..., col = "red") panel.smoother(..., span = 0.9, se = FALSE) panel.rug(...) }) I'd like a rug to appear only on the horizontal axis. None of the following seem to be the correct syntax: panel.rug(..., y = NULL) panel.rug(..., y = FALSE) panel.rug(x) panel.rug(x = ...) This does the job: xyplot(scheduleInterval ~ calledForApptDate, data = dd.2, xlab = "Date patient called for appointment", ylab = "Days in the future that patient was scheduled", panel = function(...) { panel.xyplot(..., col = "red") panel.smoother(..., span = 0.9, se = FALSE) panel.rug(x = dd.2$calledForApptDate) }) but seems inadvisable. Shouldn't I be making use of ... for passing arguments through to the panel.rug() function? Specifying a variable in a dataframe by name isn't generalizable. Thanks. --Chris Ryan [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.