[R] Insert values to histogram

Greg Snow Greg.Snow at imail.org
Thu May 5 18:49:51 CEST 2011


Are you really sure that you want to do that?

Read the discussion starting with this post: http://tolstoy.newcastle.edu.au/R/e2/help/07/08/22858.html for reasons why you probably don't (yes, the question is about bar plots not histograms, but much of it will still apply).  Near the end of the discussion there are examples of alternatives and some ways to add that may apply to your question if you still feel the need.

Part of the answer depends on how you are creating your histogram in the first place, 3 different functions pop to my mind that create histograms (and I am sure there are plenty more if I looked), how to add numbers in each case would be very different, so any help we offered (beyond generalities mentioned above) could be more misleading than helpful without that information.

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of matibie
> Sent: Thursday, May 05, 2011 5:50 AM
> To: r-help at r-project.org
> Subject: [R] Insert values to histogram
> 
> I'm trying to add the exact value on top of each column of an
> Histogram, i
> have been trying with the text function but it doesn't work.
> The problem is that the program it self decides the exact value to give
> to
> each column, and ther is not like in a bar-plot that I know exactly
> which
> values are been plotting.
> If anyone have any new idea on how to do this
> Thanks
> Matias
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/Insert-
> values-to-histogram-tp3498140p3498140.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.



More information about the R-help mailing list