title: Distribution of pixel intensity in percentage plot
body: <p>I am trying to plot the pixel intensity in percentage of a gray scale image. I have done the preprocessing part of scaling and equalization of the gray image. </p>
  
  <p>I know he histogram plot gives the pixel intensity distribution along the Y axis but i want that in percentage.</p>
  
  <p>Any help is appreciated.</p>
  
  <p>The code i used is here</p>
  
  <pre><code>  clc;
      close all;
      clear all;
      I=imread('sand5.jpg');
      j=rgb2gray(I);
      figure,imshow(j);
      J=scale_image(j,1);
      figure,imshow(J);
      K=histeq(J);
      figure,imshow(K);
  </code></pre>
  
  <p>I need the plot for Pixel intensity distribution in percentage VS pixel intensity values(0-255) along x axis for the gray scale image.</p>