search for: geom_linerange

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

2011 Dec 21
3
black and white in qplot? layout 4 graphs in one screen
...t;-ddply(June, c("TRT", "habitat"), function(df) return(c(Ab.avg=mean(df$Abundance), Ab.sd=sd(df$Abundance)))) avg.plot<-qplot(TRT, Ab.avg, fill=factor(habitat), data=Ab.avg, geom="bar", position="dodge") dodge <- position_dodge(width=0.9) avg.plot++geom_linerange(aes(ymax=Ab.avg+Ab.sd, ymin=Ab.avg-Ab.sd), position=dodge)+theme_bw() http://r.789695.n4.nabble.com/file/n4223035/june_bar_graph.png Also, would like to plot 4 of these bar graphs (for four dates) on the same screen, I cannot get the par() or layout() function to work with qplot. Is there anoth...
2010 Jun 10
1
Order labels in qplot() - ggplot2 {help}
...;b", "c") p <- c(2, 2,1, 3,5) pm<- c(3,4,2,5,4) pn <- c(1,1,1,2,3) x<-data.frame(cbind(n,p,pm,pn)) library(ggplot2) qplot(x=n, y=p, data=x, ymin=pn, ymax=pm, xlab='', ylab='', main='Order Label as: va vp a b c') + geom_hline(yintercept = 2) + geom_linerange() + coord_flip() Thanks! [[alternative HTML version deleted]]
2007 Oct 21
2
scatter plot with 1 standard deviation for each point
Hi, Could anyone give suggestions how to plot a scatter plot with 1 standard deviation for each point. To make it clearer, here is a simple example: the scatterplot is plot(X, Y), but I want to add 1 standard deviation according to the value of Z for each Y. X Y Z 1 3.5 1.1 . . . . . . . . . Thanks a lot in advance. FD [[alternative HTML
2009 Sep 11
1
bar chart with means - using ggplot
Like this? # example using qplot library(ggplot2) meanprice <- tapply(diamonds$price, diamonds$cut, mean);meanprice cut <- factor(levels(diamonds$cut), levels = levels(diamonds$cut)) qplot(cut, meanprice, geom="bar", stat="identity", fill = I("grey50")) dev.new() # create a new graph to compare with qplot # Example using ggplot ggdata <-
2010 Oct 19
3
plot CI and mortality rate
Dear R Users: I have the individual mortality rate and 95% CI of 100 hospitals, how to do the plot with the individual hospital in the Yaxis, and the mortality rate and 95% CI in the Xais and a overall mean as a reference line? Thanks and regards, Xin [[alternative HTML version deleted]]
2011 Jul 06
2
how to best present concentrated data points/ ggplot2
Hi all, I am trying to plot a weighted density plot for two different types and want to show the data points on the x axis. The code is as follows. The data points are very concentrated. Is there a better way to present it( should I set the alpha value or something else)? Thanks! YL library(ggplot2) x <- rnorm(10000) a <- rnorm(5000) b <- rnorm(5000) weights.x <- abs(a/sum(a))
2010 Apr 19
2
plotting RR, 95% CI as table and figure in same plot
Hi all-- I am in the process of helping colleagues write up a ms in which we fit zero-inflated Poisson models. I would prefer plotting the rate ratios and 95% CI (as I've found Gelman and others convincing about plotting tables...), but our journals usually like the numbers themselves. Thus, I'm looking at a recent JAMA article in which both numbers and dotplot of RR and 95% CI are