I have created a lattice bwplot that suffers from axis label overplotting. The box plot contains grid lines, and I thought that only plotting the labels for corresponding vertical grid lines would not only cure the overplotting but also be more aesthetically pleasing. Unfortunately hours of poring over manuals, documentations, mailing list archives, and other R-related text hasn't helped.
This following is the plot: http://www.lychnobite.org/images/bsf.png As you can see, the x axis labels are a mess. :( This is the code I used to generate the plot: bsf.plot = bwplot( fitness ~ Gen | Crossover * Rules, data = bsf.df, panel = function(...) { panel.grid(v = -10, h = -1) panel.bwplot(...) # cribbed some lines from lattice grid function limits <- current.panel.limits() print( limits$xlim ) # maybe add x axis plotting here? ... and suppress it elsewhere? }, subset = Gen %in% filtered.gen, # mask for plotting only some generations par.settings = list(plot.symbol = list(pch = 20)), # dots for outliers pch="|", # want median lines not dot fill="lightgray", # gray stands out more xlab="Generations", main = "Best so far" ) I suspect that I'll have to use "at" within "scale" -- but where to get the grid line coordinates? As seen above, I cut-n-pasted some of the source from "panel.grid", but then realized that there seemed to be no way to get that information to the "scale/at" parameter. Does anyone have any tips for correcting this? I suppose I could cut down the label font size, but that's a bit of an eye straining kludge. Cheers! Mark Coletti ______________________________________________ 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.