Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Re: ListPlot with missing values

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

>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 ->
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: 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