search for: xhist

Displaying 7 results from an estimated 7 matches for "xhist".

Did you mean: hist
2006 Sep 28
3
complex plots using layout()
...stograms. I tried par(mfrow= ) ahead of layout(). It does not work. Could I repeat layout() to reach my point? Following is the code I use. Any advice is greatly appreciated. ================================================================= x <- demog$age y1 <- demog$mji y2 <- demog$nles xhist <- hist(x, plot=FALSE) y1hist <- hist(y1, plot=FALSE) y2hist <- hist(y2, plot=FALSE) top1 <- max(c(xhist$counts, y1hist$counts)) top2 <- max(c(xhist$counts, y2hist$counts)) xrange <- range(x,na.rm=TRUE) y1range <- range(y1,na.rm=TRUE) y2range <- range(y2,na.rm=TRUE) de...
2010 Sep 21
5
Combined plot: Scatter + density plot
...body perhaps has already developed code for this and is willing to share. This is the reproducible code for the histogram version obtained from the site: def.par <- par(no.readonly = TRUE) # save default, for resetting... x <- pmin(3, pmax(-3, rnorm(50))) y <- pmin(3, pmax(-3, rnorm(50))) xhist <- hist(x, breaks=seq(-3,3,0.5), plot=FALSE) yhist <- hist(y, breaks=seq(-3,3,0.5), plot=FALSE) top <- max(c(xhist$counts, yhist$counts)) xrange <- c(-3,3) yrange <- c(-3,3) nf <- layout(matrix(c(2,0,1,3),2,2,byrow=TRUE), c(3,1), c(1,3), TRUE) par(mar=c(3,3,1,1)) plot(x, y, xlim=x...
2011 Mar 03
3
Probabilities greather than 1 in HIST
Dear all, I am a newbie in R and could not find help on this problem. I am trying to plot an histogram with probabilities in the y axis. This is the code I am using: #TLC uniform n=30 mi=1; mx=6 nrep=1000 xbar=rep(0,nrep) for (i in 1:nrep) {xbar[i]=mean(runif(n,min=mi,max=mx))} hist(xbar,prob=TRUE,breaks="Sturges",xlim=c(1,6),main=paste("n =",n), xlab="Média",
2008 Aug 04
2
Howto Smooth a Curve Created with the Point Function
...143.1 59.4 85.3 122.8 100.0 158.4 188.2 [85] 91.9 90.0 74.5 70.2 105.8 90.0 96.6 109.5 176.8 145.1 126.2 215.9 [97] 103.4 154.3 84.8 112.8 119.8 111.9 107.6 114.3 198.7 98.2 187.6 196.7 [109] 138.5 146.1 75.0 80.0 147.7 171.3 90.1 58.1 109.3 136.6 91.5 93.8 [121] 79.4 71.8 > xhist <- hist(x,col="blue", xlab="Exp Level",freq=FALSE) > alpha <- 6.352082 > beta <- 17.84647 > g.pdf <- dgamma(x,shape=alpha,scale=beta) > points(x,g.pdf,col="red",type='l') ## problem here My question is: Why the command "points&...
2001 Oct 13
2
hist and normal curve
Dear R people: I would like to superimpose a normal curve on a histogram. I've seen this example in a book, somewhere. I know that you draw the hist, get the mean and sd of the data set, but then I'm stuck. Could you help, please? Thanks! Erin hodgess at uhddx01.dt.uh.edu -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2005 Sep 25
4
hist(x, ...) with normal distribution curve
. I am looking for a histogram or box plot with the adding normal distribution curve I think that must be possible, but I am not able to find out how to do. Regards Knut
2012 Aug 06
4
Overlay Histogram
Dear all, For two sets of random variables, say, x <- rnorm(1000, 10, 10) and y <- rnorm(1000. 3, 20). Is there any way to overlay the histograms (and density curves) of x and y on the plot of y vs. x? The histogram of x is on the x axis and that of y is on the y axis. The density curve here is to approximate the shape of the distribution and does not have to have area 1. Thank you