I have got a dataset with two factors, and I would like to print the histograms of the variable "return" for each combination of the two factors. I do not know how can I name the figure title to sth like "main="alevel &blevel"" according to the data. par(ask=TRUE) myhistogram <- function(x) { hist (x, freq = FALSE) lines (density(x), col = "red") rug (x) } tapply(return, list(a, b), myhistogram) Could anyone help me with this? Many thanks. -- View this message in context: http://www.nabble.com/plot-histogram-and-print-tf3871150.html#a10967630 Sent from the R help mailing list archive at Nabble.com.