MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

ErrorBarFunction question.

  • To: mathgroup at
  • Subject: [mg12709] ErrorBarFunction question.
  • From: Rob Smith <rob at>
  • Date: Wed, 3 Jun 1998 02:21:00 -0400
  • Sender: owner-wri-mathgroup at


I am having trouble defining my own function for error bars in
MultipleListPlot that I think is probably a pattern matching problem.
Basically, I just want error bars without the horizontal lines (serifs)
at each end of the bar.  Without using ErrorBarFunction the plot comes
out as expected.  I have unsymmetrical error and, thus, have a list of
the following form:

    {{0.28, 0.13}, ErrorBar[{-0.19, 0.32}]}  ...
       ^     ^                 ^     ^
       x     y              negerr  poserr

So the corresponding error bar can be represented by a line from
(x,y+negerr) to (x, y+poserr); note that negerr is negative, hence
y+negerr.  So I defined an error bar function as follows:

  barfunc[{x_, y_}, ErrorBar[{negerr_, poserr_}] :=
    Line[{{x, y+negerr}, {x, y+poserr}}]

And then included in the MultipleListPlot statement:

  ErrorBarFunction -> barfunc

Obviously this doesn't work or you wouldn't be reading this!  I've
played the usual brace games and still can't get this to work.  The
error I get is:

  Unknown Graphics primitive barfunc[{0.28,0.13}, <<1>>] encountered.

Does anybody know what I am doing wrong?  Any help would be greatly


Rob Smith

Department of Biophysics & Biophysical Chemistry Johns Hopkins
University School of Medicine 725 N. Wolfe St.
Baltimore, MD 21205-2185

  • Prev by Date: TSi ProPac announcement
  • Next by Date: Power spectrum calculation and fit
  • Previous by thread: TSi ProPac announcement
  • Next by thread: Power spectrum calculation and fit