Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

Re: Plotting just specific points

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54097] Re: [mg54043] Plotting just specific points
  • From: DrBob <drbob at bigfoot.com>
  • Date: Thu, 10 Feb 2005 02:47:07 -0500 (EST)
  • References: <200502091427.JAA02654@smc.vnet.net>
  • Reply-to: drbob at bigfoot.com
  • Sender: owner-wri-mathgroup at wolfram.com

a = {5, 1, 2, 2, 6, 7, 2, 2, 8, 2};
pairs = Transpose@{Range@Length@a, a};

This leaves out data that doesn't have y == 2:

ListPlot@Cases[pairs, {_, 2}];

And this shows all the data but emphasizes points with y == 2.

point[p : {_, 2}] := {AbsolutePointSize[5], Point@p}
point@p_ := Point@p
Show[Graphics@{AbsolutePointSize[3], point /@ pairs}, Frame -> True]

Bobby

On Wed, 9 Feb 2005 09:27:15 -0500 (EST), zak <chocolatez at gmail.com> wrote:

> if i have the list:
> a={5,1,2,2,6,7,2,2,8,2}
> and in the ListPlot[a]  i want to show only the points wich represent
> only the "2" while preserving the positions of the "2" in the list, so
> i could focus my attention to a specific wanted values, how could i do
> that
> or even better if it is possible to plot the whole values of
> ListPlot[a] while making the points "2" in red color as an example.
> thanks
> zak
>
>
>
>



-- 
DrBob at bigfoot.com
www.eclecticdreams.net


  • Prev by Date: Re: finding package in ExtraPackages`Enhancements`
  • Next by Date: Re: Plotting just specific points
  • Previous by thread: Re: Plotting just specific points
  • Next by thread: Re: Plotting just specific points