mcobb_berkeley
2009-Jul-21 21:10 UTC
[R] Adjusting x/y text labels for a bwplot using cex.lab
Searched for this and found some help, but I still can't figure it out. I have trying to enlarge the x and y labels on my box plot. I understand that you can do this using "cex.lab", but it does not seem to be working for me. I must be adding it in the wrong spot. Any help would be greatly appreciated. Here is my code: bwplot(hr~Herd, data=telemetry, notch=T, ylab="Home Range Area (ha)", xlab="Herd", par.settings = list(plot.symbol = list(col = "black"),box.umbrella list(col ="black"), box.rectangle=list(col="black")),fill="light blue") ~McCrea -- View this message in context: http://www.nabble.com/Adjusting-x-y-text-labels-for-a-bwplot-using-cex.lab-tp24595920p24595920.html Sent from the R help mailing list archive at Nabble.com.
mcobb_berkeley
2009-Jul-21 23:37 UTC
[R] Adjusting x/y text labels for a bwplot using cex.lab
Figured it out --- FYI: bwplot(hr~Herd, data=telemetry, notch=T, ylab=list("Home Range Area (ha)", cex=1.5), xlab=list("Herd", cex=1.5), par.settings = list(plot.symbol list(col = "black"),box.umbrella = list(col ="black"), box.rectangle=list(col="black")),fill="light blue") mcobb_berkeley wrote:> > Searched for this and found some help, but I still can't figure it out. > I have trying to enlarge the x and y labels on my box plot. I understand > that you can do this using "cex.lab", but it does not seem to be working > for me. I must be adding it in the wrong spot. Any help would be greatly > appreciated. Here is my code: > > bwplot(hr~Herd, data=telemetry, notch=T, ylab="Home Range Area (ha)", > xlab="Herd", > par.settings = list(plot.symbol = list(col = "black"),box.umbrella > list(col ="black"), box.rectangle=list(col="black")),fill="light blue") > > ~McCrea >-- View this message in context: http://www.nabble.com/Adjusting-x-y-text-labels-for-a-bwplot-using-cex.lab-tp24595920p24597612.html Sent from the R help mailing list archive at Nabble.com.
You probably missed the bit in the lattice documentation which says that few if any of the standard par() parameters work on lattice. lattice uses its own system. Look at the xyplot help page and seek out the scales argument. That tells you that scales is a list, optionally with x and y components, that controls the axis appearance. The bit you probably want is the cex component of that. Using one of the simpler examples from ?xyplot, this looks like: xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos, type = "a", auto.key = list(space = "right", points = FALSE, lines = TRUE), scales=list(x=list(cex=1.5))) #specifies bigger text on the x-axis Steve E>>> mcobb_berkeley <mccrea.cobb at gmail.com> 07/21/09 10:10 PM >>>Searched for this and found some help, but I still can't figure it out. I have trying to enlarge the x and y labels on my box plot. I understand that you can do this using "cex.lab", but it does not seem to be working for me. I must be adding it in the wrong spot. Any help would be greatly appreciated. Here is my code: bwplot(hr~Herd, data=telemetry, notch=T, ylab="Home Range Area (ha)", xlab="Herd", par.settings = list(plot.symbol = list(col = "black"),box.umbrella list(col ="black"), box.rectangle=list(col="black")),fill="light blue") ~McCrea -- View this message in context: http://www.nabble.com/Adjusting-x-y-text-labels-for-a-bwplot-using-cex.lab-tp24595920p24595920.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help at 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. ******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}}