[R] ggplot2 question plot mean/error bars

Santosh santosh2005 at gmail.com
Wed Apr 5 20:50:02 CEST 2017

Hello Rxperts..
I am trying to generate a mean+/- error plot.. using ggplot2.. with filled
black and white circles and black lines, but no overlap  of lines and
circles (symbols). Also, with no top and right lines of the plot box. I
remember having done this before.. unable to reproduce how I did!

Yes, there are many ways of generating the plot.. Would high appreciate it
if you could help debug this piece of code.

Attaching sample code for your convenience..

q <-
q$r <- q$b*0.1
q2 <- q[order(q$G,q$D,q$a,q$t),]

  q3 <-
  q3$t <- as.numeric(q3$t)
  q3$b.mean <- as.numeric(q3$b.mean)
  q3$b.sd <- as.numeric(q3$b.sd)
  q3$b.se <- as.numeric(q3$b.se)

+     geom_point(shape=21,size=4) +
    geom_line() +
geom_errorbar(width=1,aes(ymin=Mean-SE,ymax=Mean+SE)) +
geom_errorbar(width=1,aes(ymin=Mean-SE,ymax=Mean+SE)) +
    scale_shape_manual(values = c(16,21)) +
    scale_fill_manual(values=c("black","white")) +
    scale_color_manual(values=c("black","black")) +
    +legend.position = c(.8,.8))

	[[alternative HTML version deleted]]

More information about the R-help mailing list