I have a 2D numpy array that's created like this:
data = np.empty((number_of_elements, 7))
Each row with 7 (or whatever) floats represents an object's properties. The first two for example are the x
and y
position of the object, the others are various properties that could even be used to apply color information to the plot.
I want to do a scatter plot from data
, so that if p = data[i]
, an object is plotted as a point with p[:2]
as its 2D position and with say p[2:4]
as a color information (the length of that vector should determine a color for the point). Other columns should not matter to the plot at all.
How should I go about this?