From: Beata on

Dear Math Group,

I have a question about ErrorListPlot.

I have a date
date={{37741.`, 3.1955`}, {37742.`, 3.1786`}, {37743.`, 3.1818`}, {37746.`,
3.1871`}, {37747.`, 3.2004`}, {37748.`, 3.2739`}, {37749.`, 3.2364`},
{37750.`, 3.2039`}, {37753.`, 3.2186`}, {37754.`, 3.2191`}, {37755.`,
3.2368`}, {37756.`, 3.2534`}, {37757.`, 3.2238`}, {40197.`, 3.0782`},
{40198.`, 3.1455`}, {40199.`, 3.205`}, {40200.`, 3.1967`}, {40203.`,
3.1881`}, {40204.`, 3.2198`}, {40205.`, 3.2597`}, {40206.`, 3.2554`},
{40207.`, 3.2131`}, {40210.`, 3.1527`}, {40211.`, 3.1495`}, {40212.`,
3.1585`}, {40213.`, 3.3218`}};

and
xminus={-0.009, -0.0018, -0.0047, -0.0091, -0.0307, -0.0725, -0.0099,
-0.0053, -0.0249, -0.0177, -0.0252, -0.0083, -0.0049, -0.0099,
-0.0462, -0.0859, -0.0227, -0.0211, -0.0081, -0.0308, -0.0582,
-0.0279, -0.0081, -0.0084, -0.0292, -0.157};

xplus={0.039, 0.0451, 0.0232, 0.0123, 0.0038, 0.0057, 0.0287, 0.0166,
0.0043, 0.0157, 0.0066, 0.0121, 0.0329, 0.0334, 0.0105, 0.0094,
0.0374, 0.0229, 0.0357, 0.0178, 0.0122, 0.0334, 0.0766, 0.0228,
0.0075, 0.0334}

I want to show graph

ErrorListPlot[{date , ErrorBar[{xminus , xplus } ]},
PlotStyle -> Red, PlotRange -> Full]

but it's instruction with errors.
Please for correct mistakes.

From: Sjoerd C. de Vries on
Dear Beata,

First you should get the package in which ErrorListPlot is defined:

Needs["ErrorBarPlots`"]

Then you should use the proper syntax for ErrorListPlot, i.e. a list
with data points and their corresponding Errorbars
ErrorListPlot[{{x1,y1,ErrorBar[{r11,r12}]},
{x2,y2,ErrorBar[{r21,r22}]} ... }]. You were using two separate lists.

This should work:

ErrorListPlot[{date,
ErrorBar @@@ ({xminus, xplus}\[Transpose])}\[Transpose],
PlotStyle -> Red, PlotRange -> Full]

However, given the strange distribution of your data this won't give
you a pretty plot.

Cheers -- Sjoerd


On Feb 10, 10:35 am, "Beata " <beatawarc...(a)gmail.com> wrote:
> Dear Math Group,
>
> I have a question about ErrorListPlot.
>
> I have a date
> date={{37741.`, 3.1955`}, {37742.`, 3.1786`}, {37743.`, 3.1818`}, {3774=
6.`,
> 3.1871`}, {37747.`, 3.2004`}, {37748.`, 3.2739`}, {37749.`, 3.2364`},
> {37750.`, 3.2039`}, {37753.`, 3.2186`}, {37754.`, 3.2191`}, {37755.`,
> 3.2368`}, {37756.`, 3.2534`}, {37757.`, 3.2238`}, {40197.`, 3.0782`},
> {40198.`, 3.1455`}, {40199.`, 3.205`}, {40200.`, 3.1967`}, {40203.`,
> 3.1881`}, {40204.`, 3.2198`}, {40205.`, 3.2597`}, {40206.`, 3.2554`},
> {40207.`, 3.2131`}, {40210.`, 3.1527`}, {40211.`, 3.1495`}, {40212.`,
> 3.1585`}, {40213.`, 3.3218`}};
>
> and
> xminus={-0.009, -0.0018, -0.0047, -0.0091, -0.0307, -0.0725, -0.0099,
> -0.0053, -0.0249, -0.0177, -0.0252, -0.0083, -0.0049, -0.0099,
> -0.0462, -0.0859, -0.0227, -0.0211, -0.0081, -0.0308, -0.0582,
> -0.0279, -0.0081, -0.0084, -0.0292, -0.157};
>
> xplus={0.039, 0.0451, 0.0232, 0.0123, 0.0038, 0.0057, 0.0287, 0.0166,
> 0.0043, 0.0157, 0.0066, 0.0121, 0.0329, 0.0334, 0.0105, 0.0094,
> 0.0374, 0.0229, 0.0357, 0.0178, 0.0122, 0.0334, 0.0766, 0.0228,
> 0.0075, 0.0334}
>
> I want to show graph
>
> ErrorListPlot[{date , ErrorBar[{xminus , xplus } ]},
> PlotStyle -> Red, PlotRange -> Full]
>
> but it's instruction with errors.
> Please for correct mistakes.


From: Sjoerd C. de Vries on
Dear Bea,

Please read my previous advise as

ErrorListPlot[{date,
ErrorBar /@ ({xminus, xplus}\[Transpose])}\[Transpose],
PlotStyle -> Red, PlotRange -> Full]

So, /@ instead of @@@ (Map instead of Apply at level 1). The former
yields ErrorBar[{xlow,xhi}], the latter ErrorBar[xlow,xhi] (without
the curly brackets) which is the format for errors in both x and y
directions.

Cheers -- Sjoerd

On Feb 11, 12:17 pm, "Sjoerd C. de Vries" <sjoerd.c.devr...(a)gmail.com>
wrote:
> Dear Beata,
>
> First you should get the package in which ErrorListPlot is defined:
>
> Needs["ErrorBarPlots`"]
>
> Then you should use the proper syntax for ErrorListPlot, i.e. a list
> with data points and their corresponding Errorbars
> ErrorListPlot[{{x1,y1,ErrorBar[{r11,r12}]},
> {x2,y2,ErrorBar[{r21,r22}]} ... }]. You were using two separate lists.
>
> This should work:
>
> ErrorListPlot[{date,
> ErrorBar @@@ ({xminus, xplus}\[Transpose])}\[Transpose],
> PlotStyle -> Red, PlotRange -> Full]
>
> However, given the strange distribution of your data this won't give
> you a pretty plot.
>
> Cheers -- Sjoerd
>
> On Feb 10, 10:35 am, "Beata " <beatawarc...(a)gmail.com> wrote:
>
> > Dear Math Group,
>
> > I have a question about ErrorListPlot.
>
> > I have a date
> > date={{37741.`, 3.1955`}, {37742.`, 3.1786`}, {37743.`, 3.1818`}, {37=
74=
> 6.`,
> > 3.1871`}, {37747.`, 3.2004`}, {37748.`, 3.2739`}, {37749.`, 3.2364`},
> > {37750.`, 3.2039`}, {37753.`, 3.2186`}, {37754.`, 3.2191`}, {37755.`,
> > 3.2368`}, {37756.`, 3.2534`}, {37757.`, 3.2238`}, {40197.`, 3.0782`},
> > {40198.`, 3.1455`}, {40199.`, 3.205`}, {40200.`, 3.1967`}, {40203.`,
> > 3.1881`}, {40204.`, 3.2198`}, {40205.`, 3.2597`}, {40206.`, 3.2554`},
> > {40207.`, 3.2131`}, {40210.`, 3.1527`}, {40211.`, 3.1495`}, {40212.`,
> > 3.1585`}, {40213.`, 3.3218`}};
>
> > and
> > xminus={-0.009, -0.0018, -0.0047, -0.0091, -0.0307, -0.0725, -0.0099,
> > -0.0053, -0.0249, -0.0177, -0.0252, -0.0083, -0.0049, -0.0099,
> > -0.0462, -0.0859, -0.0227, -0.0211, -0.0081, -0.0308, -0.0582,
> > -0.0279, -0.0081, -0.0084, -0.0292, -0.157};
>
> > xplus={0.039, 0.0451, 0.0232, 0.0123, 0.0038, 0.0057, 0.0287, 0.0166,
> > 0.0043, 0.0157, 0.0066, 0.0121, 0.0329, 0.0334, 0.0105, 0.0094,
> > 0.0374, 0.0229, 0.0357, 0.0178, 0.0122, 0.0334, 0.0766, 0.0228,
> > 0.0075, 0.0334}
>
> > I want to show graph
>
> > ErrorListPlot[{date , ErrorBar[{xminus , xplus } ]},
> > PlotStyle -> Red, PlotRange -> Full]
>
> > but it's instruction with errors.
> > Please for correct mistakes.