MathGroup Archive 2000

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

Search the Archive

Re: ListPlot with missing values

  • To: mathgroup at
  • Subject: [mg22342] Re: ListPlot with missing values
  • From: aram at (Aram Schiffman)
  • Date: Fri, 25 Feb 2000 21:13:36 -0500 (EST)
  • References: <892pd1$>
  • Sender: owner-wri-mathgroup at

>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
your question:
alist = {{1, 1}, {2, 3}, {4,}, {5, 6}, {7,}, {9, 12}}

ListPlot[Complement[alist, Cases[alist, {x_, Null}]], PlotJoined ->
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: how to spin a ScatterPlot3D
  • Next by Date: Re: a Graphic in a Graphic
  • Previous by thread: ListPlot with missing values
  • Next by thread: Re: ListPlot with missing values