[R] shading an area in a edf
Hi, I've got the following edf: *** x = c(1.6,1.8,2.4,2.7,2.9,3.3,3.4,3.4,4,5.2) F2.5 <- ecdf(x) plot(F2.5, verticals= TRUE, do.p = TRUE, lwd=3, ylab = "", xlab = "", xlim = c(1,5.5)) abline(h= (0:5)*0.2) #mean abline(v=mean(x), lwd=2) mtext(text=expression(bar(x) == 3.07), side=1, adj=0.462, padj=3, cex=1) *** Now I would like to shade the two areas: http://www.nabble.com/file/p18334136/ecdf.gif Is it possible to do this without too much effort? Thanks for any suggestion Tobias -- View this message in context: http://www.nabble.com/shading-an-area-in-a-edf-tp18334136p18334136.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] combine mathematical expressions with plain text
Hello, I would like to create a mtext. The argument 'text' should combine the mathematical expressions 'bar' with the plain text ' = 3.07'. Is that possible? mtext(text=expression(bar(x)) ...) ' = 3.07' Thanks for any ideas Tobias -- View this message in context: http://www.nabble.com/combine-mathematical-expressions-with-plain-text-tf4486503.html#a12793991 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] Adjust barplot to the left
Hello, I have the following problem: I created an ecdf and a barplot. Unfortunatly, the bars are not where I would like them to be (please see picture below). http://www.nabble.com/file/p12877530/problem.gif That's my code: # par(mfrow=c(2,1), mar=c(2,3,3,2)) #ECDF x = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2) F2.5 <- ecdf(x) plot(F2.5, verticals= TRUE, do.p = TRUE, lwd=3, ylab = "", xlab = "", main = "Figur 2.12 Frequenztabelle und eVf", xlim = c(-1,4)) abline(h= (0:10)*0.1) mtext(text="x", side=1, adj = 1.03, padj=1.23, cex=1.2) mtext(text="f(x)", side=3, adj = -0.06, padj=-1, cex=1.2) par(mar=c(4,3,1,2)) #Barplot width<-c(0.4, 0.4, 0.4) height<-c(0.5, 0.35, 0.15) barplot(height,width,xlim=c(-1,4), space=1.5,) axis(side=1) # Can anyone tell me how I can adjust the bars to the left? Thanks Tobias -- View this message in context: http://www.nabble.com/Adjust-barplot-to-the-left-tf4514904.html#a12877530 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] how to create this graph?
Hello, I'm trying to create the following graph: http://www.nabble.com/file/p12974686/bar.gif Is there a command (like pie(...) or barplot(...)) or is this just a special case of eg barplot? I'd be glad if someone could give me a hint on where to start. Regards, Tobias -- View this message in context: http://www.nabble.com/how-to-create-this-graph--tf4546742.html#a12974686 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.