Re: Colored ListPlot

*To*: mathgroup at smc.vnet.net*Subject*: [mg9037] Re: [mg8975] Colored ListPlot*From*: seanross at worldnet.att.net*Date*: Wed, 8 Oct 1997 00:05:34 -0400*Sender*: owner-wri-mathgroup at wolfram.com

Adam Hardin Price wrote: > > If it is possible I would like to ListPlot["list"], where list of points > in the plane, but with the following quality. > The points will be joined (easily done with PlotJoined-> True), and they > should have a color function assigned to them so that the color of each > joining line is determined in some way by the points on the ends (or point > on one end if it easier.) Any suggestions would be appreciated, by me! > -Adam > > -waiting to appreciate your suggestions. The answer is yes, but not with any convenient, one line option. The first way is with MultipleListPlot where you can specify a Symbol Label with a custom color as in: MultipleListPlot[Table[n,{n,1,6}],SymbolLabel->{Table[StyleBox["a",FontColor->Hue[n/6.]]//DisplayForm,{n,1,6}]}], but this does not change the color of the symbol, only the associated label. The other way is to write code for your own "ListPlot" function using graphics primitives. You combine Show[Graphics[Point[.....]],....] and specify the options for each point you want to plot. This is extremely tedious to write in by hand, but using the various array functions, it shouldn't be too hard to automate using Map, Table, etc. If 3-D is what you are after, then use the Option ColorFunction, which does allow you to specify the color of points as a function of the x and y coordinates.