On Wed, Sep 9, 2009 at 2:53 PM, Afshartous, David <dafshart...@med.miami.edu> wrote: > > All, > > Below is an xyplot plot with multiple panels and a title produced via main: > > library("lattic") > data.ex = data.frame(y = rnorm(10), t = rep(1:5, 2), group = rep(c(0,1), > each = 5)) > > xyplot(y ~ t | as.factor(group), data = data.ex, > main = list("Put figure caption here xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > want this line left justified" )) > > I must be mis-interpreting the help description for main under xyplot, and > the descriptions of just, hjust, and vjust in textGrob, since manipulation > of these arguments do not seem to produce the desired result of having the > second line of text left-justified.
This seems to work. You need to choose a suitable value of 'x', as the default will be to start at the center. xyplot(y ~ t | as.factor(group), data = data.ex, main = textGrob("Put figure caption here xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx want this line left justified", x = 0, hjust = 0)) -Deepayan ______________________________________________ R-help@r-project.org mailing list 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.