Re: Help with ErrorListPlot
- Subject: [mg3212] Re: Help with ErrorListPlot
- From: ianc (Ian Collier)
- Date: 18 Feb 1996 03:45:56 -0600
- Approved: usenet@wri.com
- Distribution: local
- Newsgroups: wri.mathgroup
- Organization: Wolfram Research, Inc.
- Sender: daemon at wri.com
In article <4frvbu$k13 at dragonfly.wolfram.com>, Edmond
<underwoe at Colorado.Edu> wrote:
> Does anyone know how to get ErrorListPlot[{{x,y,dy}}] going? I have version
> 2.2 on Solaris and Next, and I have version 2.1 under NT. It's not in the
> standard package, so I load the graphics package with
> Needs["Graphics`Graphics`"]. After loading the package, it still
doesn't graph
> my plot. It doesn't recognize it as a function. Does anyone know how to make
> this work? Your answers are greatly appreciated (e-mail if you could as this
> is the first time I've ever posted to this group and wouldn't be able to get
> around to it very often).
>
>
> --
> Edmond Underwood
> email: underwoe at Colorado.Edu
> Bench32 for Windows NT and Windows 95
> http://www.rmii.com/~underwoe/bench32.html
The only thing I can think is that you are trying to plot
a function rather than a list of x, y, dy triples.
Here is an example adapted slightly from the Guide to
Standard Mathematica Packages Technical Report.
In[10]:=
Needs["Graphics`Graphics`"]
In[11]:=
?ErrorListPlot
ErrorListPlot[{{y1, dy1}, {y2, dy2}, ...}] plots a list of
data with error bars. ErrorListPlot[{{x1, y1, dy1}, ...}]
allows x, as well as y, positions to be specified.
In[12]:=
expdata = Table[ {x, .75 10^(.6 x)+ Random[Real, {-1.0,1.0}]},
{x, 0.2, 1.2,.1}]
Out[12]=
{{0.2, 0.937442}, {0.3, 1.57208}, {0.4, 2.14111},
{0.5, 1.86885}, {0.6, 2.53587}, {0.7, 1.89474},
{0.8, 3.04204}, {0.9, 2.67411}, {1., 2.98289},
{1.1, 4.18244}, {1.2, 4.07424}}
In[13]:=
errdata = Map[ Append[ #, 1.0]&, expdata]
Out[13]=
{{0.2, 0.937442, 1.}, {0.3, 1.57208, 1.},
{0.4, 2.14111, 1.}, {0.5, 1.86885, 1.},
{0.6, 2.53587, 1.}, {0.7, 1.89474, 1.},
{0.8, 3.04204, 1.}, {0.9, 2.67411, 1.},
{1., 2.98289, 1.}, {1.1, 4.18244, 1.}, {1.2, 4.07424, 1.}}
In[14]:=
ErrorListPlot[ errdata ]
Out[14]=
-Graphics-
If you need further help with this problem I would suggest
that you contact Wolfram Research Technical Support
(support at wolfram.com) directly, including details of exactly
what input and data you were using.
I hope this helps.
--Ian
-----------------------------------------------------------
Ian Collier
Wolfram Research, Inc.
-----------------------------------------------------------
tel:(217) 398-0700 fax:(217) 398-0747 ianc at wolfram.com
Wolfram Research Home Page: http://www.wolfram.com/
-----------------------------------------------------------