MathGroup Archive 2005

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

Search the Archive

Re: Plotting just specific points

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54111] Re: [mg54043] Plotting just specific points
  • From: yehuda ben-shimol <bsyehuda at gmail.com>
  • Date: Fri, 11 Feb 2005 03:33:24 -0500 (EST)
  • References: <200502091427.JAA02654@smc.vnet.net>
  • Reply-to: yehuda ben-shimol <bsyehuda at gmail.com>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi zak
A simple way to do it is
a = {5, 1, 2, 2, 6, 7, 2, 2, 8, 2};
a = Thread[{Range[Length[a]], {5, 1, 2, 2, 6, 7, 2, 2, 8, 2}}];
highlighted = Select[a, #[[2]] == 2 &];
ListPlot[a, Epilog -> {Red, PointSize[0.02], Point /@ highlighted}];

but if you nead more control on the properties of the non red points
may it is better to generate and control gaphics directly, e.g.,

Show[Graphics[{PointSize[0.025], If[#[[2]] == 2, {
        Red, Point[#]}, {Green, Point[#]}] & /@ a}], Axes -> True]
yehuda

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


  • Prev by Date: Re: FindMinimum::nnum
  • Next by Date: Re: Image Geometric CorrectionDavid Bailey,dbaileyconsultancy.co.uk
  • Previous by thread: Re: Plotting just specific points
  • Next by thread: Re: Plotting just specific points