#Base Value 1 0.949369084 2 0.008434194 3 0.115617068 4 0.182823643 5 0.656706731 6 0.761605327 ...
Comparison operator: "<" (less than)
Numeric limits and colors:This combination of limits and comparison operator lead to the following rules:
Limit Color 2 Red 0.85 Orange 0.4 Black
- If the data-value is less than 2 (but greater than or equal to 0.85) it will be colored red.
- If the data-value is less than 0.85 (but greater than or equal to 0.4) it will be colored orange.
- If the data-value is less than 0.4 it will be colored black.
- (If the data-value is greater than or equal to 2, it will not be colored by these rules.)
The choice of comparison operator is important. If ">" were chosen instead of "<", the same set of numeric limits would produce entirely different rules, as shown in the following example.
Comparison operator: ">" (greater than)
Numeric limits and colors: (same as in Example 1)
This comparison operator would lead to the following rules:
- If the data-value is greater than 2 it will be colored red.
- If the data-value is greater than 0.85 (but less than or equal to 2) it will be colored orange.
- If the data-value is greater than 0.4 (but less than or equal to 0.85) it will be colored black.
- (If the data-value is less than or equal to 0.4, it will not be colored by these rules.)
Instead of using < (less-than) or > (greater-than), one can select >= (greater-than-or-equal-to) or <= (less-than-or-equal-to).
The choice of comparison operator (> vs >= or < vs <=) can be subtle, but can sometimes have an important impact on the overall colorizing effect.
Note the differences (in italics) between the rules in this example and those in Example 1.
Comparison operator: "<=" (less than or equal to)
Numeric limits and colors: (same as in Example 1)
This comparison operator would lead to the following rules:
- If the data-value is less than or equal to 2 (but greater than 0.85) it will be colored red.
- If the data-value is less than or equal to 0.85 (but greater than 0.4) it will be colored orange.
- If the data-value is less than or equal to 0.4 it will be colored black.
- (If the data-value is greater than 2, it will not be colored by these rules.)
Note that in the above examples, there was always a numeric range that fell outside of the rules (e.g. in Example 1, any value greater than or equal to 2 would not have been affected by the coloring operation). This is not a problem if the data has known upper and lower limits, because you can always add more rules to ensure that all valid data values are included. But for some types of data that do not have fixed upper and/or lower limits, it might be safer to add a rule that implicitly covers values that fall outside of the range of other rules. This can be done using the special limits "INF" (infinity) and "-INF" (negative infinity). For example, we could amend Example 1 to cover all values, even those greater than or equal to 2 as follows: Comparison operator: "<" (less than)
Numeric limits and colors:This comparison operator and limits would lead to the following rules:
Limit Color INF Blue 2 Red 0.85 Orange 0.4 Black Since, by definition, every real data value is less than infinity, the first rule would apply to any number greater than or equal to 2.
- If the data-value is less than Infinity (but greater than or equal to 2) it will be colored blue.
- If the data-value is less than 2 (but greater than or equal to 0.85) it will be colored red.
- If the data-value is less than 0.85 (but greater than or equal to 0.4) it will be colored orange.
- If the data-value is less than 0.4 it will be colored black.
A similar situation would occur for the comparison operators > and >= (e.g. in Example 2, where any value less than or equal to 0.4 would have been ignored). In those cases "-INF" could be used to ensure that all values below a given limit would still be included. In Example 2, adding the limit "-INF" with the color "Purple" would have ensured that any value less than or equal to 0.4 would have been colored purple.