Hi,
A new version of the package fdth (1.1-4) was released today.
More than one person have been requesting this option, so, it was
incorporated in the methods (S3) to plot a fdth object.
This task will be more easy now. For example:
library(dfth)
plot(fdt(iris), v=TRUE, cex=.8) # for histogram
An alternative approach:
library(fdth)
fd <- fdt(rnorm(1e3, m=10, sd=2))
plot(fd)
breaks <- with(fd, seq(breaks["start"], breaks["end"], breaks["h"]))
mids <- 0.5 * (breaks[-1] + breaks[-length(breaks)])
y <- fd$table[, 2]
text(x=mids, y=y,
lab=y,
pos=3)
HTH,
JCFaria
--
View this mess
Thank's a lot
I owe you all 10 points of my grade!!
--
View this message in context:
http://r.789695.n4.nabble.com/Insert-values-to-histogram-tp3498140p3502017.html
Sent from the R help mailing list archive at Nabble.com.
[[alternative HTML version deleted]]
On 05/05/2011 09:50 PM, matibie wrote:
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
Histograms plot data in bins - you don't get the exact value, because
each bin contains a range of values. Do you want to plot the range of
values the bin contains? Also, check ?hist to see how to set the
values of the breaks between the bins.
__
R-help@
hcare
greg.s...@imail.org
801.408.8111
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of matibie
> Sent: Thursday, May 05, 2011 5:50 AM
> To: r-help@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 bee
7 matches
Mail list logo