I have been trying to figure out how to assign a specific range of numbers for each color but to no avail. What I want is for there would be a distinct color to represent each range/group of numbers. For example, all values less than 10 will be displayed as blue, 10-50 as green, 50-100 as yellow, and beyond 100 as red. I would really appreciate your help regarding this! Thanks!
Please share your data
Hi @rmdmagalong , welcome to the ParaView community!
This is a tricky request with how ParaView maps data to colors. Typically, you specify your overall data range and then the color map separately, and the data values are mapped linearly into the that data range to determine the colormap. You would need to define the data range and color map in such a way that the values between colors in the map fall on the data threshold values where you want to change color. In general, that’s tough to do with ParaView
With these specific data ranges, however, you could set the overall data range to [10,100]. Then your color map should be defined with the Number of Table Values set to 9 colors. Add two control points at 50 (set to green) and 50.000001 (set to yellow). Now, check the Use Below Range Color option and click to set that color to blue and check the Use Above Range Color option and click to set that color to red. This should give you the color mapping you are looking for. The UI should look like
continued
This yields with some test data
In the general case where it is not easy to figure out how to create a color map that happens to change colors at your preferred data thresholds, I would use a Python Calculator or Programmable Filter to classify a data point as being in one of a number of categories represented by an integer. You can then use the Interpret Values as Categories option to map these categories directly to colors.
Hi Mathieu,
Unfortunately, the file keeps on failing to upload. What’s your email? I can send it to you via email.
Regards,
Raymond
Hi Cory,
Thanks for replying. I will try this out. Much appreciated!
Regards,
Raymond
You can use https://wetransfer.com/
Hi Mathieu,
Thanks for letting me know about WeTransfer. I just learned about it now. Here’s the link: Unique Download Link | WeTransfer thanks!
Regards,
Raymond
Here you go:
Here is the state file:
state.pvsm (219.7 KB)
I used “above” color as suggested by @cory.quammen as well as a manually created step color map.
Thank you @cory.quammen and @mwestphal ! I am going to study how to replicate this. Thanks!
Regards,
Raymond