The new node values in a logarithmically-scaled colormap are calculated by taking the log of the current extents (the minimum and maximum of the colormap), finding the log value of the original node position, and then taking the antilog of that value.
For example, for a Rainbow colormap from a data min of 0.007299754353 to a data max of 4375.671427:
- Take the log of the current extents.
The log of extents of 0.007299754353 is -2.136691754 and the log of 4375.671427 is 3.641044703. - Find the position of the node along the colormap.
If you saved the colormap to a CLR file, you can look at the CLR file to find the node position. Otherwise, you can calculate it by dividing the existing node value by the data range, and then multiply by 100. For the yellow node, this would be 2625.406 / (4375.671427 - 0.007299754353) * 100 = 60%. - Calculate the log value of the node at the position calculated in step 2.
The 60% position between the calculated log extents (-2.136691754 to 3.641044703) is 1.3299485. - Calculate the antilog of the value calculated in step 3.
The antilog of 1.3299485 is 21.377. This is the new node value on the log scaled colormap.
Updated December 2, 2021
Comments
0 comments
Please sign in to leave a comment.