I've looked at the lattice book and the 'R Graphics Cookbook' without seeing how to change the labels along the x axis for groups in a box plot, specifically cenbox(). The attached example has a main and axes labels with default group labels. Please point me to a reference on how I can change 'FALSE' and 'TRUE' to something more easily understood by viewers. TIA, Rich -------------- next part -------------- A non-text attachment was scrubbed... Name: silver.pdf Type: application/pdf Size: 25501 bytes Desc: URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120718/7951c570/attachment.pdf>
Code? Sample data? John Kane Kingston ON Canada> -----Original Message----- > From: rshepard at appl-ecosys.com > Sent: Wed, 18 Jul 2012 14:30:24 -0700 (PDT) > To: r-help at r-project.org > Subject: [R] cenbox(): Changing Default x-axis Group Labels > > I've looked at the lattice book and the 'R Graphics Cookbook' without > seeing how to change the labels along the x axis for groups in a box > plot, > specifically cenbox(). > > The attached example has a main and axes labels with default group > labels. > Please point me to a reference on how I can change 'FALSE' and 'TRUE' to > something more easily understood by viewers. > > TIA, > > Rich > ______________________________________________ > 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.____________________________________________________________ FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!
Hi Rich, I don't have a cenbox() function that I can find, but your solution will (probably? hopefully?) be along the lines of: foo <- boxplot( y ~ x, data=sdf, plot=FALSE) foo$names <- ifelse(foo$names, "Label for TRUE", "Label for FALSE") bxp(foo) where sdf is a dataframe containing your data and y and x are appropriate variables in it. -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 7/18/12 2:30 PM, "Rich Shepard" <rshepard at appl-ecosys.com> wrote:> I've looked at the lattice book and the 'R Graphics Cookbook' without >seeing how to change the labels along the x axis for groups in a box plot, >specifically cenbox(). > > The attached example has a main and axes labels with default group >labels. >Please point me to a reference on how I can change 'FALSE' and 'TRUE' to >something more easily understood by viewers. > >TIA, > >Rich