Skip to main content
2 of 4
image etc.
Jinxed
  • 3.8k
  • 10
  • 24

You can use the following construct to draw the error bars yourself using any collection of geometric shapes available:

(* starting out with defining some points, errors etc. *)
pts = NestList[{#[[1]] + 1, #[[2]] + RandomReal[{0., 1.}]} &, {0, 
                RandomReal[]}, 19];
err = RandomReal[4, 20];
data = Table[{pts[[i, 1]], pts[[i, 2]], err[[i]]}, {i, 1, Length@pts}];

hw = 1; (* the width of the ticks *)
ErrorListPlot[data, ErrorBarFunction -> Function[{coords, errs}, {
  (* the vertical line: *)
  Line[{coords - {0, errs[[2, 1]]/2}, coords + {0, errs[[2, 1]]/2}}],
  (* horizontal tick 1: *)
  Line[{coords - {hw/2, -errs[[2, 1]]/2}, coords + {hw/2, errs[[2, 1]]/2}}],
  (* horizontal tick 2: *)
  Line[{coords - {hw/2, errs[[2, 1]]/2}, coords + {hw/2, -errs[[2, 1]]/2}}]
}]]

Example:

hw==1

Jinxed
  • 3.8k
  • 10
  • 24