Discussion:
Problem with scatter-plot and setting color of a range of points
Jerzy Ellert
2013-08-30 20:49:30 UTC
Permalink
Hello Chaco users !

I have, I hope, not very difficult problem - how to set a color for some
ranges of data in a scatter plot.

I want achieve the following effect:
set a color for some ranges of data of scatter plot.

I know how to change size of points, if one have input data:
x = numpy.array([1,2,3,4,5,6,7,8])
y = numpy.array([2,3,4,5,6,7,8,9])
and a scatter plot (for example as an instance of ColormappedScatterPlot
class) represented by variable scatter,
then sizes of points at indexes 3-6, could be changed to 11 by the
following code:

scatter.marker_size[3:7] = 11

I can't figure out how set a color, if I have RGB of that color for some
range of points (like range 3-6 in the above example).

It seems to me that I have to use color_data and color_mapper parameters
of a scatter plot but I don't understand how.


Thanks for any help !

jeel

Loading...