-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visualize indexed quantities using a fixed color palette #289
Comments
There isn't a magic built-in function for this, but it's at the top of my to-implement list :) I actually started some work for it, there's a shader function here polyscope/src/render/opengl/shaders/common.cpp Lines 116 to 143 in 3f52c5e
I want to expose this as an option for arbitrary scalar values which happen to be integers, but have not done so yet. There is also another (slightly more-difficult) step needed, to change the interpolation policy e.g. for vertex-valued integers on the mesh, so they get nearest-neighbor interpolated rather than linearly interpolated. That is possible within Polyscope's shaders but not implemented yet. |
Thanks for the quick answer! I think an important feature for discrete colormaps is to have a way to either detect or specify the number of discrete values you want to use in the color palette. I'm not sure you need the Maybe once you have the nearest-neighbor interpolation, it's mostly a matter of having more helper functions to create custom discrete colormap textures (e.g. load from a 1D array instead of from a file, or create some colorbrewer palettes). |
Hi! I was wondering if there's an easy to visualize discrete scalar attributes (e.g. facet coloring/clustering). It seems that scalar quantities are associated a continuous color map (like Viridis), but I'd like to use a discrete color palette instead (maybe using something from https://colorbrewer2.org?).
The text was updated successfully, but these errors were encountered: