MathGroup Archive 2009

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

Search the Archive

Re: ErrorListPlot with Indeterminate list elements

  • To: mathgroup at smc.vnet.net
  • Subject: [mg103971] Re: [mg103924] ErrorListPlot with Indeterminate list elements
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Wed, 14 Oct 2009 07:55:32 -0400 (EDT)
  • References: <200910131117.HAA29218@smc.vnet.net>
  • Reply-to: drmajorbob at yahoo.com

Perhaps ErrorListPlot should do something like this:

Needs["ErrorBarPlots`"];

Clear[myErrorListPlot]
myErrorListPlot[pts_, opts___] :=
  ErrorListPlot[
   Select[pts,
    FreeQ[#,
      Indeterminate | DirectedInfinity | ComplexInfinity | Null |
       Complex] &, opts], opts]

pts = RandomReal[{-10, 10}, {20, 2}];
pts[[3]] = {0, 1 + I};
pts[[5]] = {Indeterminate, Indeterminate};
pts[[6]] = {0, -Infinity};
myErrorListPlot[pts]

Bobby

On Tue, 13 Oct 2009 06:17:49 -0500, pfalloon <pfalloon at gmail.com> wrote:

> Hi,
>
> I've just noticed what seems to me to be a bug in the behaviour of
> ErrorListPlot which may be worth pointing out...
>
> When given a list of pairs, {{y1,dy1}, {y2,dy2}, ...}, the expected
> result is a plot with vertical coordinate yi and error bar of half-
> width dy1. e.g.:
>
>    Needs["ErrorBarPlots`"];
>
>    pts = RandomReal[{-10,10},{20,2}];
>
>    ErrorListPlot[pts]
>
> However, if the list contains one or pairs of Indeterminate values, it
> no longer does this, but instead seems to "fall through" and return a
> regular ListPlot with the Indeterminate point discarded:
>
>    pts[[5]] = {Indeterminate, Indeterminate};
>
>    {ErrorListPlot[pts], ListPlot[pts]} // Row
>
> This seems like a bug: I feel the "correct" behaviour would be to
> discard the Indeterminate point, and then return the ErrorListPlot of
> the remaining points.
>
> Cheers,
> Peter.
>


-- 
DrMajorBob at yahoo.com


  • Prev by Date: Re: Convert Graphics3D to Graphics2D. Is it possible?
  • Next by Date: Re: Re: Re: The graph of (x + 2)^(1/5) + 4 not
  • Previous by thread: ErrorListPlot with Indeterminate list elements
  • Next by thread: Mathematica 7.01 and Mac OS 10.6 (Snow Leopard)