Visual Computing in Life Science: Color for Visualization
These images show exactly the same data but they have different color spaces. The left top one is rainbow color space and it is used for reading exactly values and it is normal setting of many devices. The right top is isomorphic colormap and it is more visible in the bottom half than the rainbow color map and we can distinguish the specific region that reflects the specific intensity in the rainbow color map. Therefore, we need to choose the color map carefully.
Real Case
The left one’s colormap is wrongly picked and doctors thought the patient needs a catheter to expand the blood vessel and they performed surgery and found out the surgery actually does not need to be done. They rebuilt the picture with different color map and they got the right picture. So, picking a proper color map in life science can produce significant results.
Scales of Measurement
Before picking the color map, we need to think about our data is which type is. According to Stanley Smith Stevens, there are 4 types, Nominal, Ordinal, Interval, and Ratio.
- Nominal: It does not have order and just class, ex. types of birds.
- Ordinal: It has small and big concepts but it does not have meaning on (+, -) operators. ex. T-shirt size
- Interval: It has small and big concepts and it also has meaning with (+, -) operators. ex. temperature.
- Ratio: It has all properties of interval type and it has meaning with ratio. ex. height (we can say the thing is twice taller than other.)
Nominal Data Visualization
In my other post, I mentioned people cannot distinguish many colors at the same time and its maximum is around 9 basic colors: Magenta, Blue, Blue-green, Green, Yellow-green, Yellow, Orange, Reddish orange, Red. This is the recommendation of colors.
This is the six opponent colors and we can think this is a natural choice. In deuteranomaly, the ability to distinguish between red and green is preserved if color contrast and luminance are sufficient.
Ordinal Data
It is not that hard to choose the color map in this case. What we need to consider is the color map needs to clearly suggest ordering.
Interval Data
The rainbow color map is not a good choice to visualize interval data. In the right picture above, we can see it is hard to distinguish.
Ratio Data
Caveat
Grayscale for color-coding:
The picture above is hard to find the details and the differences between the legend. Why does it happen?
- Our perception of brightness actually does not follow the linear relationship with luminous and it follows the power law.
- Due to contrast effects, large read off errors(20% of range) occurs when using grayscale to encode continuous quantities. It happens because our eyes exaggerate the contrast.
Rainbow Color Map
The default colormap in many visualization systems, eye-catching, improves read off accuracy, but it has many drawbacks:
- No intuitive ordering
You can say rainbow has order but it is not intuitively perceived by humans. Therefore, it is not a good idea to choose a rainbow color map to visualize ordered values.
2. Can reduce sensitivity
Luminance has a high contrast sensitivity but the contrast sensitivity between colors is poor.
3. Artifactual gradients:
In the color map, the change of color looks like the sudden transition of values because the rainbow color map is not a unity color map for human perception. It can look like a slow or quick transition of value.
4. Relies on red-green vision
You have to consider the colorblind because many people have it.
Guidelines for Color Map Design
General suggestion:
- Combine changes in hue with monotonically increasing luminance
- Avoid combining red and green
- Enforce perceptual uniformity
- Supports reading off values more precisely
- Still maintains an intuitive impression of high and low values.
But, in most of the case, you can use well pre-designed colormaps.
How do we choose color maps?
The choice depends on whether to highlight neutral value, use in 2D or on the surface(in this case, we need to avoid dark color because we are going to use shading on the surface), and aesthetics / personal preference. We can choose these color maps on ParaView, MatPlotlib, or other libraries.
Practical tips
If you want to consider the color impairment you can check:
http://www.color-blindness.com/coblis-color-blindness-simulator/
Check the color maps for your own purpose:
Saturation
If you visualize small shape or fine details then it needs to be strong to be distinguishable and you can check the google map they use the soft colors on backgrounds. Therefore you should use a strong color on details and soft colors on backgrounds. If the data is text, you should use enough luminance contrast or add a strong border(or Cornsweet edge).
Cornsweet edge
Conrsweet edges can increase apparent contrast in an image. It does not affect the actual luminance but it makes the overshoot on both sides and it is useful because our eyes are sensitive towards the contrast.
This post is published on 8/31/2020