## 2 Materials and Methods
### Color Transformation  
In the HSV color space, the hue (H) indicates the color portrayed in a cyclic fashion, ranging from red to green to blue and back to red. Usually, it is represented as an angle between \(0^{\circ}\) and \(360^{\circ}\), but it can be remapped to the \([0,1]\) range [34]. The cyclic nature of H can be avoided by cropping the H values to \([0.3,1]\), which would remove the first third of colors corresponding to red-orange-yellow while maintaining the last red corresponding to the highest H values. The saturation (S) of a color represents its distance from its grayscale equivalent; therefore, highly saturated images will provide vibrant, colored images, while saturation values close to zero will yield a fully grayscale image. For each individual H and S, the value (V) represents its shade or tint. For example, a vibrant red that has a fixed H and S differs from a brownish red only in its V component [35]. It is possible to use the properties of the HSV formalism to create a single representation of up to three magnitudes by assigning each of them to one coordinate of the HSV space. The proposed procedure is summarized in Algorithms 1 and 2. Our aim is to keep the transformation constant for each dataset, so the same interpretation, scale and legends can be applied for all samples in the same dataset. Since HSV magnitudes are defined in the range \([0,1]\), we need to scale all data to this range. Let \(y_{i}\) be a 2D numerical map that represents some property of a sample (\(i\)). Let \(Y=y_{1},\ldots,y_{i},\ldots,y_{N}\) be the set of \(y_{i}\) for all the samples in the dataset (\(N\)). Then, each \(y_{i}\) can be scaled to the range \([0,1]\) while keeping the relationship between all \(y_{i}\) by making use of the range defined by \(min(Y)\) and \(max(Y)\) (function ScaleData in Algorithm 1). ```
1:functionScaleData(data, DatasetMin, DatasetMax)
2: ValueScaled = (data \(-\) DatasetMin)/(DatasetMax \(-\) DatasetMin)
3:returnValueScaled
4:endfunction
5:functionEqualizeHue(data, fit, nBins)
6:if fitthen
7: bins \(=\vec{x}\in\) [min(data), max(data)] \(\triangleright\) No. of elements: nBins
8: histogram \(=\sum_{i=1}^{n}\) DataFrequency\({}_{i}\)
9: CDF = \(\sum_{i=1}^{n}\) histogram\({}_{i}\)
10:endif
11:for all\(d\in\) data do
12: position \(\rightarrow\) find a in bins
13: OutData = CDF(position)
14:endfor
15:returnOutData
16:endfunction
```  
**Algorithm 1** Scaling and equalization functions  
However, having data in the \([0,1]\) range does not imply that the visualization of maps in HSV will improve the overall representation. This is of particular importance when scaling \(y_{i}\) with respect to \(Y\), since the range is not defined by each \(y_{i}\), but by \(Y\). If there is one \(y_{j}\) with a particularly high maximum value (outliers), all of the remaining scaled \(y_{i}\) will have their values collapse to a small dynamic range. If this happens for the magnitude that we later assign to H, this would mean that all samples would essentially have the same \"color\", resulting in insignificant visualization improvements. To compensate for this effect, histogram equalization can be performed prior to assigning \(Y\) to any HSV coordinate, as proposed in [26]. However, we propose improving the equalization process by considering the histogram of the dataset \(Y\) as a whole, as well as its cumulative distribution function (\(CDF\)), to non-linearly scale each \(y_{i}\) with \(CDF(Y)\), so that those ranges where data are heavily compressed can be expanded to occupy the full \([0,1]\) range. This additional equalization (function EqualizeHue in Algorithm 1) is applied to the magnitude representing H only, since our aim is to use color as an immediate means to distinguish between sample types. Using a global instead of a local equalization allows for the use of only one HSV legend to compare between images.