Re: how to draw points with different color?

Hi Helen,

> Suppose I have  200 points at location x[] and y[], I want to draw
> those points  at their  location with different colors ( 200 different
> color points ).
>
> How can I do it? Which example I can refer to?

Create a FlatField with MathType (index -> (x, y, r, g, b)),
create r[], g[] and b[] arrays of colors for your 200 points,
pass 'new float[][] {x, y, r, g, b}' to the setSamples()
method of your FlatField, and display with ScalarMaps x -> XAxis,
y -> YAxis, r -> Red, g -> Green and b -> Blue.

Good luck,
Bill


  • 2002 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: