Plotting MRI intensity histogram from a segmentation

Operating system: Windows 10
Slicer version:5.4
Expected behavior
how can I plot an intensity histogram using 3Dslicer?

Histogram rarely contains information that is relevant for end users, so we haven’t created a GUI for this feature, but you can get it by a few lines of Python code. See a complete example (including generating sample data, computing the histogram, and plotting the result) in the script repository.