Re: [R] Fitting long names in boxplot

From: hadley wickham <>
Date: Sat, 01 Mar 2008 08:45:03 -0600

On Fri, Feb 29, 2008 at 4:40 PM, Alex Reynolds <> wrote:
> I have the following code:
> subsetTimeDataPlot <- boxplot(subsetTimeData$time ~
> subsetTimeData$build, horizontal=True, col="lightblue", ...)
> The 'names' component consists of strings that can be up to 20-30
> characters long.
> How would I go about drawing the names vertically (not the boxplot) or
> shrinking the names text (I tried cex.names=0.7 but this didn't help).

You might try:

qplot(build, time, data=subsetTimeData, geom="boxplot") + coord_flip()

which will automatically allocate enough space for the names. You can find out more about ggplot2 at



______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Sat 01 Mar 2008 - 14:47:54 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 01 Mar 2008 - 16:30:18 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive