sgPointObjects and Colors
Removing Color Maps:
We will use built-in Two-degree Field Galaxies as our example. The mod file contains the following code:
eval cmap exgal.cmap
eval color distGly 0 3
eval color prox5Mpc 1 50
eval lum prox5Mpc 0 1
eval lum const 1.0
eval slum 130.0
eval color rgb 0.5 0.5 0
The bolded lines are the various commands that effect the color of the points. eval cmap exgal.cmap sets the color map for the points. eval color prox5Mpc 1 50 is the command that sets the color of the points by applying the exgal.cmap color map to the prox5Mpc column of data in the spec file, and sets the lower and upper limits of the color map as 1 and 50 respectively. This command overrides the other eval color commands as color map commands override constant color commands, and later commands override earlier ones. Deleting (or commenting out) the first three lines will cause all the points to take on the color specified by the eval color rgb command, which specifies the red, green, and blue values of the color. For example, eval color rgb 1 0.5 0 produces all orange dots.
Adding a color map
We will use the Sloan data as an example of adding a color map to a sgPointsObject. In this case we will use the distance of the galaxies from Earth to produce the following effect:
To do this we must first create a color map file to use, called sloan.cmap. The color map file has the first uncommented line as the number of colors in the color map file, and the the remaining lines are the red, green, and blue values for each color (in the range [0,1]). Note that the first color in the color map file is unused. For this demonstration we will use the following simple color map
4
0 0 0
1 0 0
0 1 0
0 0 1
Now that we have a color map we have to bind the color map to the data by adding the command eval cmap sloan.cmap. We then need to tell Uniview what data column and range to apply the color map. In this case the command eval color distMpc 0 650 binds it to the distance and the range [0, 650]. If you want to color by a integral classification system (e.g. release in the Sloan galaxy data or type in the Tully data) you can replace the range in the color command by the keyword exact (e.g. eval color release exact). In this case Uniview will assign the colors from the second listed color onward as though they were zero-indexed (i.e. a value of 0 will be the second color in the color map file, a value of 1 will be the third color, etc.).
Служба підтримки клієнтів працює на UserEcho