I have my histogram with this appearance
And he wanted to get this way, but I don't know which fields should I change or where
I wanted to like this
How can i make this definition?
I understand you want to plot the histogram of an image in a way to limit the x axis to 255 shades of gray and y to the number of pixels in the image. This should do the work:
ima=[1 2 255;0 23 78;3 60 200;255 0 78]
plot([0:255],hist(ima(:),[0:255]))
set(gca,'xLim',[0 255])
set(gca,'yLim',[0 numel(ima)])