nana,

If you save the boxplot as an R object, you can access various parameters of
the resulting plot. Since we don't have your data, I'll give you an example
with the preloaded ToothGrowth dataset:

ToothGrowth<-y
b<-boxplot(y$len~y$dose,xaxt="n")

Now, if you type b at the R prompt, you will see that b$n contains the
number of points you are looking for.

So let's say you want to show those numbers on the X axis, you can do:

axis(1,at=1:length(b$names),labels=paste(b$names,"\n(n=",b$n,")",sep=""))


On Thu, Jun 24, 2010 at 2:47 PM, David Winsemius <dwinsemius@comcast.net>wrote:

>
> On Jun 24, 2010, at 7:45 AM, nana wrote:
>
>
>> Hi everyone,
>> I made this set of boxplots that would show me the widths of some sites
>> broken up by some chromosome, but I don't know how to make it indicate the
>> number of data points that created the boxplot.
>> How do I do that?
>>
>> boxplot(data$site~data$chr,varwidth='TRUE')
>>
>>  ?boxplot
> ... read the Value section
> ?text
>
>
>
>
>>
>> --
>> View this message in context:
>> http://r.789695.n4.nabble.com/boxplot-width-tp2266805p2266805.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> 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.
>>
>
> ______________________________________________
> 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.
>

	[[alternative HTML version deleted]]

