visit
visit copied to clipboard
PC plot of all zero scalar is all blue but all zero vector gives nothing and "plot yielded no data"
Describe the bug
- Create an expression that is a zero vector everywhere.
- Do a vector plot of it.
- You get a blank image and a
plot yielded no datawarning. - If you do similar for a PC plot of all zero scalar, you get a plot and no warning.
- We know the glyphs are all zero length but should we still plot them as vectors with no stems?
It had me confused for a second and I think occasional user would be equally confused.
Not sure its worth the effort and so maybe just document it.
- @biagas observed that we probably don't do anything special to filter out zero vectors and could perhaps wind up in a situation where the default behavior of plotting 400 vectors could wind up selecting randomly 400 zero vectors even though the full dataset contains a lot of non-zeros and wind up telling the user, falsely, the plot yielded no data.
- We believe that the VTK glyphing logic may be removing zero-sized glyhps.
- We could maybe decide, when all glyphs we want to plot zero to convert to point glyph or something.
In looking at vtkGlyph3D, it looks like you can define more than one glyph type to use for the object, indexed by vector magnitude ranges. So, we could define a sphere or box for zero magnitude vectors and a normal vector glyph for everything else. That might fix this behavior.