79131952

Date: 2024-10-28 03:08:00
Score: 0.5
Natty:
Report link

The package superb (version 0.95.19) has a geom geom_superberrorbar() with the possibility to color differently the two halves using arguments vcolour and wcolour. You can also have multiple tips and decide of their direction:

library(superb)
library(ggplot2)

dta <- data.frame(grp = c(1,2,3), center=c(1,2,3), width = c(1,1,1.5) )

ggplot(dta, aes(ymin=center-width, ymax=center+width, x = grp ) ) +
  geom_superberrorbar(tipformat = "triple", width= 0.1, 
                      tipgap = 0.04, direction = "left",
                      colour = "black", 
                      vcolour = "purple", wcolour="red")

error bars with three tips left point and two colors

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Denis Cousineau