# I need to generate a histogram of intensities! 

**URL:** https://discourse.slicer.org/t/i-need-to-generate-a-histogram-of-intensities/19621
**Category:** Support
**Created:** [September 11, 2021, 12:47pm UTC](https://discourse.slicer.org/t/i-need-to-generate-a-histogram-of-intensities/19621 "2021-09-11T12:47:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![debadrita\_jana](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/debadrita_jana/32/12327_2.png) [@debadrita\_jana](https://discourse.slicer.org/u/debadrita_jana)
#### Post date: [September 11, 2021, 12:47pm UTC](https://discourse.slicer.org/t/i-need-to-generate-a-histogram-of-intensities/19621/1 "2021-09-11T12:47:55Z")

</div>

Operating system:Windows  
Slicer version:4.11.20210226  
Expected behavior: Copy pasting the code is not working  
Actual behavior: Errors are showing up

---

<div class="post-metadata">

### Author: ![SHADI](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@SHADI](https://discourse.slicer.org/u/SHADI)
#### Post date: [April 28, 2023, 3:47pm UTC](https://discourse.slicer.org/t/i-need-to-generate-a-histogram-of-intensities/19621/2 "2023-04-28T15:47:21Z")

</div>

Hi Debadrita,  
I have the same issue.  
Did you find the answer? It would be appreciated if you share it with me.

---

<div class="post-metadata">

### Author: ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)
#### Post date: [April 28, 2023, 4:12pm UTC](https://discourse.slicer.org/t/i-need-to-generate-a-histogram-of-intensities/19621/3 "2023-04-28T16:12:13Z")

</div>

@SHADI you are posting a follow up on a question that didn’t get answered. That’s because the poster didn’t provide any information beyond message “eerrors are showing up”. We don’t know what code was pasted, what were the errors etc.

There is already an example script for generating histograms from volumes in slicer script repository  
[https://slicer.readthedocs.io/en/latest/developer\_guide/script\_repository.html#volumes](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#volumes)

It seems to work perfectly on the latest stable.

 ![Screen Shot 2023-04-28 at 9.11.23 AM](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/9/39346ae57e702937f5b360240fcd24cba594057b.jpeg)

Please give that a try, and then if you still encounter issues, give us more information about your slicer version, operating system, the code you pasted and the errors that was generated.
