title: ggplot legend issues: elements overlapping and/or missing? [geom_pointrange, geom_point and geom_segment]
body: <p>Using the following data frame and vector: </p>
  
  <pre><code>df&lt;-data.frame(time=as.POSIXct(c("2013-04-23 10:00:00","2013-04-23 12:08:00")), 
                 info=c("point","point"),
                 bin=c("bin length","bin length"),
                 upper=c(3.7,1.54),
                 lower=c(3.11,1.13),rate=c(3.43,1.33))
  deltaTS=df$time[2]-df$time[1]
  </code></pre>
  
  <p>The data.frame can be graph using the following code:</p>
  
  <pre><code>ggplot(data=df,aes(x=time+deltaTS*.97,y=rate))+
   geom_pointrange(aes(ymin=lower,ymax=upper,x=time+deltaTS*.97,position="identity"),color="white",show_guide=T)+
   geom_point(size=7,color="white",aes(color=info,fill=info,group=info))+
   geom_point(size=6,color="tomato",aes(color=info,fill=info,group=info))+
   geom_segment(aes(x=time, y=0, xend=time+(deltaTS*.96), yend=0,fill=bin,group=bin), alpha=0.7,color="black",size=3,show_guide=F)+
   geom_segment(aes(x=time+(deltaTS*.01), y=0, xend=time+(deltaTS*.95), yend=0,fill=bin,group=bin), alpha=0.7,color="tomato",size=2,show_guide=T)+
   theme(legend.title = element_text(size=15),
      legend.text = element_text(size = 15),
      plot.title = element_text(size=20),
      strip.text = element_text(size=18),
      axis.title.x = element_text(size=18),
      axis.title.y = element_text(size=19),
      axis.text.x = element_text(size = 15, colour = 'black', angle = 0),
      axis.text.y = element_text(size = 15, colour = 'black', angle = 0),
      legend.position = "right",
      panel.background = element_rect(fill = "#333333"),
      panel.grid.major = element_line(colour = "#454545"),
      panel.grid.minor = element_line(colour = "#454545"))+
   ylim(0,4)+
   scale_x_datetime(lim = c(as.POSIXct("2013-04-23 10:00:00", format="%Y-%m-%d %H:%M:%S"),as.POSIXct("2013-04-23 14:30:00", format="%Y-%m-%d %H:%M:%S")))+
   xlab("time")+
   ylab("rate")+ ggtitle("Point, Bin Length and 95% CI")
  </code></pre>
  
  <p>The graph's legend can be improved. Specifically, the elements in the legend for <code>geom_segment()</code> and <code>geom_point()</code> overlap while none of the elements for <code>geom_pointrange()</code> are displayed:</p>
  
  <p><img src="https://i.stack.imgur.com/KgOx2.png" alt="enter image description here"></p>
  
  <p>Can "point" and "bin length" icons be separated so they do not overlap while adding the the "confidence interval" to the legend? More specifically, the <code>geom_segment()</code> and <code>geom_point()</code> elements in the legend should not overlap. The <code>geom_pointrange()</code> elements should be displayed in the legend as well. Thanks for any help!</p>
  
  <p>EDIT 9/16/2013: Here's a graph with the sort of legend that I'd like to create:
  <img src="https://i.stack.imgur.com/JrWSX.png" alt="enter image description here"></p>