# Plotting a histogram of particle intensity vs pixel

I am trying to reproduce a figure, shown below, of a particle intensity binned by the pixel number then fit the distribution to a Gaussian. I have a similarly magnified intensity image of my particle, with 8-bit depth, loaded into MATLAB.

I am having difficulty understanding how the bottom figure seems to retain spatial information after binning. The goal is to fit the distribution to a Gaussian.

• Can you give the reference, where this figure is from? Mar 13, 2017 at 20:35
• I am not really sure what you are asking; are you wondering how to get the distribution from your image? Perhaps it is not clear to you that the distribution shown is one "slice" through your image on any axis? Mar 14, 2017 at 0:02
• The reference is lem.che.udel.edu/sandbox/groups/furstgroupwiki/wiki/7672a/… Mar 14, 2017 at 0:41
• @DanBoschen It wasn't clear to me that the plot was a slice. I agree it could be that simple. It's a single slice hist with the bin range from -10 to + 10? Mar 14, 2017 at 0:48
• Yes and single slice histogram through the center of the object with a bin range of -10 to +10 pixels. I wasn't sure if that was your confusion. The top view of the plot is a 3D Gaussian distribution which looks like a hill, no matter which way you slice it in profile through the center you will get a Gaussian distribution. So if you slice in the x axis, the y axis or any diagonal new axis that you create, as long as it goes through the center it will be an identical Gaussian distribution. Mar 14, 2017 at 0:51