Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*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 2002

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

Search the Archive

Re: Colored ListPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg36888] Re: Colored ListPlot
  • From: "Borut L" <gollum at email.si>
  • Date: Tue, 1 Oct 2002 04:45:10 -0400 (EDT)
  • References: <an8sm0$6r6$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

Your problem can be solved in numerous ways of course, try something like .:

Module[
  {
    data=Flatten[Table[{x,y,Random[]},{x,10},{y,10}],1]
    },
  Show[
    Graphics[
      {
        AbsolutePointSize[10],
        data/.{x_,y_,z_}\[Rule]{Hue[z],Point[{x,y}]}
        }
      ]
    ,AspectRatio\[Rule]Automatic
    ]
  ]

Note that you can replace the main part, ie the transforming rule from point
lists to colored point directives with a function for example .:

{Hue[#3],Point[{#1,#2}]}&@@@data



bye,

Borut

<Moranresearch at aol.com> wrote in message news:an8sm0$6r6$1 at smc.vnet.net...
| I have a list of points l1={xi,yi,zi} how can I make a 2D list plot of
| {xi,yi} where the color of each point is zi ? Thank you. John




  • Prev by Date: Replacement problem
  • Next by Date: Re: Colored ListPlot
  • Previous by thread: Re: Colored ListPlot
  • Next by thread: Re: Colored ListPlot