I’m trying to create a discrete color bar for my data.
When I click “Interpret Values as Categories” in the Color Map Editor I am presented with this warning:
Though my dataset consists of integers and has less than 32 discrete values.
And since I have to create each entry manually, is there any API available through the Python Shell to make that easier?
Alternatively, I know I could separately generate an xml colormap and load that in. But I would still want to be able to quickly update the values/annotations on the fly with a simple for loop.
So I can easily set all the Values/Annotations I need, but generating the colors (even random ones) is more difficult.
I could sit there and click the “Add new entry” button over and over to auto-generate some colors, but that’s less than ideal, even for a work-around.
Is there a way to access the “random” (I think it’s actually consistently random, starting with white, red, blue, green…) colors that this button produces so that I can replicate this behavior programmatically?
After more testing, I see it’s only this one dataset that has this issue.
Unfortunately I cannot share it.
I’m trying to reproduce with one that I can.
The problem with the preconfigured discrete color maps is that they are obviously configured with a certain number of values/annotations, none of which match what I’m after.
In case I run into this again I plan on creating a map from scratch and saving it as a preset.