RE: plot coloring
- To: mathgroup@smc.vnet.net
- Subject: [mg10450] RE: [mg10444] plot coloring
- From: Jean-Marie THOMAS <jmthomas@cybercable.tm.fr>
- Date: Fri, 16 Jan 1998 04:34:38 -0500
Try this: t=Table[{Random[],Random[]},{5}];(*two dimensional coordinates*) l=Line@t;(*a line to join the points*) p=Point/@t(*transforms coordinates into graphic primitive Point*) c:=RGBColor[Random[],Random[],Random[]](*graphic directive you can make a function of your points*) Show[Graphics[{l,Map[{c,PointSize[1/30],#}&,p]}]] Hope this helps, ----------------------------------------------- Jean-Marie THOMAS Conseil et Audit en Ingenierie de Calcul jmthomas@cybercable.tm.fr +33 (0)3 88 32 93 64 www.cybercable.tm.fr/~jmthomas ======================= -----Message d'origine----- De: Paul.Hanson@colorado.edu [SMTP:Paul.Hanson@colorado.edu] Date: mardi 13 janvier 1998 08:08 A: mathgroup@smc.vnet.net Objet: [mg10444] plot coloring Hola, all; I'm looking for a way to color lines. Say I have a data set {{{x,y},...{xn,yn}},{{x1,y1}....{xn1,yn1}},.....} and I want to plot each of the points in the set with different colors. I've tried using Map to change the values of r,g,b but they all change byt the same amount, thus, the lines are always the same color. How do I vary r,g,b selectively and uniquely so that I get different colors for each line? Great site and thanks for all the help! Paul Hanson -- * * * * /\ */\* / \ / \ /\