MathGroup Archive 2005

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

Search the Archive

Re: Plotting just specific points


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