You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adjustment of histogram bin width / locations via the UI
Using integer bin limits for integer images (e.g. uint8, uint16)
For example, if you show the coins image in Napari (File > Open Sample > napari builtins > Coins) and view the histogram, it has an odd 'spiky' appearance where every other bin is higher or lower:
I think this is because the limits of the bins aren't set to integer values (even though this image is uint8 and therefore only contains positive integers). E.g. I think the bins are np.linspace(1, 252, 100) according to here, so for example bin 20 onwards is: 51.7, 54.2, 56.7, 59.3, 61.8, which means the bins accept pixel values of (52, 53, 54), (55, 56), (57, 58, 59), (60, 61)... This alternating of 2 and 3 pixel values in each bin gives this spiky appearance which is a bit misleading to the actual values. Would it be possible to set integer bin edges, or allow this to be set as an option? Thanks!
The text was updated successfully, but these errors were encountered:
👍 to doing this, a pull request that implements both suggestions (integer bins for integer data, and a bit of GUI to customise the bins) would be welcome. I'd recommend going with the integer bins first as that will require much less design work and be easier to implement.
It would be great to allow:
uint8
,uint16
)For example, if you show the coins image in Napari (

File > Open Sample > napari builtins > Coins
) and view the histogram, it has an odd 'spiky' appearance where every other bin is higher or lower:I think this is because the limits of the bins aren't set to integer values (even though this image is
uint8
and therefore only contains positive integers). E.g. I think the bins arenp.linspace(1, 252, 100)
according to here, so for example bin 20 onwards is:51.7, 54.2, 56.7, 59.3, 61.8
, which means the bins accept pixel values of (52, 53, 54), (55, 56), (57, 58, 59), (60, 61)... This alternating of 2 and 3 pixel values in each bin gives this spiky appearance which is a bit misleading to the actual values. Would it be possible to set integer bin edges, or allow this to be set as an option? Thanks!The text was updated successfully, but these errors were encountered: