Minor scalar bar improvements
When the colormap is discretized it would be nice if the labels lined up with the boundaries of the colors.
This can be achieve by setting ScalarBarActor->SetNumberOfLabels(n + 1); when the number of colors n "is small" (how small is "small" remains to be determined, there may be a way to make it work for large numbers too but I haven't looked into it). See following image for comparison:
- before:
- after:
Also scalar bar related, but independent of the previous point, VTK's widget is drawn with 64 colors by default which may make it look like the colormap is discretized (visible steps on the bar) even when it's not.
The number of drawn steps could be raised (arbitrarily? dynamically according to render resolution?), for example using scalarBar->SetMaximumNumberOfColors(512);:
- before:
- after:
arbitrarily
Yeah, that sounds fine to me.
hi, it's dsniel from discord, i'd like to be assigned to this issue :]
Sure !
VTK's widget is drawn with 64 colors by default which may make it look like the colormap is discretized (visible steps on the bar) even when it's not.
Fixed by #2321
Hi @rrhxde , do you want to tackle the remaining part of the issue ?
I’m not able to right now, could I be unassigned?
Of course!