masking some cells/ facets while using cellColors
See original GitHub issueHi again,
I’ve been trying to use the scalebar and cellColors()
to visualise facet-based data and have come across this problem. I have a DTM for which I have a list of values each of which maps to a facet ID. So in theory I could visualise the DTM based data. However within this list I also have facets to which there are no values / data to be shown, which I have by default set to 0.
However, when I showcase the data and put a scalebar in the side, I’m not able to just show only the facets to which I have the data. Since the undesired facets are set to 0., they also appear coloured and makes the visualisation a bit misleading. I tried to use argument ‘alpha’ to set the transparency, but it leads to loosing information about the terrain on the DTM where there are no values. So I’m not sure how to deal with this issue. Sometimes I have values that range from -1 through 2 for the facets, and as such, setting values to 0. will be misleading the visualisation itself. So I’m wondering whether there is a way to still show the coloured facets, but only show the mesh for the undesired facets (those that I’m setting to 0.), while preserving the terrain info.
I do not know if I made myself clear. Please let me know if it’s not clear or you need more information.
Thank you in advance !
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Thanks @ifermion - in the meanwhile i’ll try to figure out why the
nan
trick is not working for cells…well, finally I managed to get it solved by getting an array of facets mapping to their vertices using
mesh.faces()
though which I could find the ‘points’ that needed to be deleted and by eventually deleting them by callingdeletePoints()
. However I think there is much shorter way of doing that. I thought of posting this temporary solution, just in case someone like me runs into the same problem.Thank you again for quickly reacting and helping out.