Re: ListPlot with missing values

• To: mathgroup at smc.vnet.net
• Subject: [mg22375] Re: ListPlot with missing values
• From: "Allan Hayes" <hay at haystack.demon.co.uk>
• Date: Sat, 26 Feb 2000 22:05:02 -0500 (EST)
• References: <892pd1\$pj6@smc.vnet.net> <897ebc\$5rc@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Aram,
We can use DeleteCases:

alist = {{1, 1}, {2, 3}, {4,}, {5, 6}, {7,}, {9, 12}}

ListPlot[DeleteCases[alist, {x_, Null}], PlotJoined -> True]

Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"Aram Schiffman" <aram at sirius.com> wrote in message
news:897ebc\$5rc at smc.vnet.net...
>
> >Does anyone have a Mathematica routine that behaves like ListPlot with
> >PlotJoined->True, where the  data have missing values (given by a set
> >number, or if preferred by being out of range) and only joins
> >non-missing values.  Assume the listis long (500-600 points)  and there
> >may be quite a few (100-200) missing values. Such a routine wouldbe a
> >big help.
> >
>
> I'm not sure what constitutes a "missing value". I assume you mean x
> values with no corresponding y values. Here's one way, if I understand
> ===================
> alist = {{1, 1}, {2, 3}, {4,}, {5, 6}, {7,}, {9, 12}}
>
> ListPlot[Complement[alist, Cases[alist, {x_, Null}]], PlotJoined ->
> True]
> ===================
> In this example, the missing values are just plain missing. If the
> missing y values are instead indicated by a particular value,
> substitute that value for "Null" above.
>
> The length of the list won't matter.
> Aram Schiffman '99 VFR800
>

```

• Prev by Date: Re: Plotting triplets
• Next by Date: Display Bug
• Previous by thread: Re: ListPlot with missing values
• Next by thread: rigid body combined rotation/translation with Mathematica