Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Re: Error Bars

  • To:
  • Subject: [mg10927] Re: Error Bars
  • From: Paul Abbott <>
  • Date: Thu, 12 Feb 1998 20:16:09 -0500
  • Organization: University of Western Australia
  • References: <6br6vm$>

Gernot August Weber wrote:

>  i need to draw error bars in mathematica. is there any possibility
> without writing an own routine?
> please mail to:

Recently there was another posting related to this topic by Ben Yung
<>.  Here was my reply to Ben:

In[1]:= data=Table[{x,Sin[x]},{x,0.,3,0.5}];

Generate two lists of errors:

In[2]:= xerror=Table[{-1,1}Random[]/3,{Length[data]}]; In[3]:=

(I have symmetric errors generated by direct multiplication by {-1,1}.

In[4]:= <<Graphics`MultipleListPlot`

Here are the errorbars

In[5]:= errorbars= Apply[ErrorBar,Transpose[{xerror,yerror}],{1}];

Now we can write

In[6]:= MultipleListPlot[Transpose[{data,errorbars}]];

Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia            Nedlands WA  6907  AUSTRALIA                   

            God IS a weakly left-handed dice player

  • Prev by Date: Re: output to a file
  • Next by Date: Re: ListPlot and List problem
  • Prev by thread: Re: Error Bars
  • Next by thread: Thank you