## matplotlib-users

 [Matplotlib-users] Point-specific colors with scatter From: Fred Mailhot - 2008-03-14 03:00:44 ```Hi there, I've got 4 time series that live in a 2-d space (imagine points at (1,1), (1,2),(2,1), and (2,2) that drift a little over time), and I'm using scatter() to show them. How can I plot so that each of the groups of points has the same colour? I've checked the docs and examples and can't seem to find quite what I'm looking for. A sample script or indication of where to look in the docs would be appreciated. Many thanks! Fred. -- Research is what I'm doing when I don't know what I'm doing. -- Wernher von Braun ```
 [Matplotlib-users] Point-specific colors with scatter From: Mark Bakker - 2008-03-14 14:37:15 Attachments: Message as HTML ```Not sure, but do you just mean: Point-specific colors with scatter scatter([0,1,1,0],[0,0,1,1],10,'y',edgecolor='y') Gives yellow points with size 10 color yellow. Mark ```
 Re: [Matplotlib-users] Point-specific colors with scatter From: Manuel Metz - 2008-03-14 14:43:04 ```Fred Mailhot wrote: > Hi there, > > I've got 4 time series that live in a 2-d space (imagine points at > (1,1), (1,2),(2,1), and (2,2) that drift a little over time), and I'm > using scatter() to show them. How can I plot so that each of the > groups of points has the same colour? > > I've checked the docs and examples and can't seem to find quite what > I'm looking for. A sample script or indication of where to look in the > docs would be appreciated. > > Many thanks! > Fred. What you can do is something like this: x = arange(4) # just some test-data y = x**2 c = ['#ff0000', '#cc3300', '#996600', '#66cc00'] # the color sequence pylab.scatter(x,y, color=c) I think you get what you are looking for if you do this for each group separately. Manuel ```