# \[qSlicerScalarVolumeDisplayWidget\] Adding user-defined histogram to this

**URL:** <https://discourse.slicer.org/t/qslicerscalarvolumedisplaywidget-adding-user-defined-histogram-to-this/21448>\
**Category:** Support\
**Tags:** python\
**Created:** [January 13, 2022, 4:29pm UTC](https://discourse.slicer.org/t/qslicerscalarvolumedisplaywidget-adding-user-defined-histogram-to-this/21448 "2022-01-13T16:29:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![strider\_hunter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/strider_hunter/32/8253_2.png) [@strider\_hunter](https://discourse.slicer.org/u/strider_hunter)\
**Post date:** [January 13, 2022, 4:29pm UTC](https://discourse.slicer.org/t/qslicerscalarvolumedisplaywidget-adding-user-defined-histogram-to-this/21448/1 "2022-01-13T16:29:02Z")

</div>

Hi,  
I wish to add a **user-defined histogram** in ScalarVolumeDisplayWidget. Is it possible to do so? I have seen solutions that display histograms using slicer.util.plot(), but I have a very specific user-defined layout that I do not wish to disturb.

The reason why I need a custom histogram, is that I am unable to interpret the widgets default histogram. The images below might help illustrate my issue.

This is a histogram made using slicer.util.plot() for a particular volume  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/6/766dd1741b56b22fb1997591ad8173b44d9aad09.png)

But the histogram in the ScalarVolumeDisplayWidget looks like this. I am unable to interpret this.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/2/3229d1fe99c8377ccca9dcbffef16d76aa05afea.png)

For e.g, another volumes histogram plot that does offer insight into its properties is this:-

 ![MicrosoftTeams-image (1)](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/5/c525775feb3b9b19b2461527315572679f1d5ad6.jpeg)  
The grey’ish parts in the widget histogram can be seen in the slicer.util.plot() histogram.
