Facing problem in plotting Grey Level Co-occurrence Matrix (GLCM) of an image in MATLAB [closed]

I am working in the filed of digital image processing. Recently I read a paper that plots Grey Level Co-occurrence Matrix (GLCM) of an image for some processing. As it is shown in following Figure I am trying to plot GLCM in MATLAB using the graycoprops function but not getting expected results.

I am using the following MATLAB code.

img = imread('lena.bmp');
if(size(img, 3) == 3)
img = rgb2gray(img);
end

subplot(1,2,1), imshow(img);
subplot(1,2,1), plot(graycoprops(img));


Kindly tell me that how can I plot GLCM as it is shown in the Figure.

closed as off-topic by A_A, MBaz, Matt L., jojek♦Mar 8 '17 at 11:17

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question does not appear to be about signal processing within the scope defined in the help center." – A_A, MBaz, Matt L., jojek
If this question can be reworded to fit the rules in the help center, please edit the question.

• I am struggling to see the difficulty that seems to have motivated this question, after reviewing MATLAB's help pages on the matter. You are trying to plot a structure, when you should be looking at the output of graycomatrix – A_A Mar 7 '17 at 15:22
• this structure is used to plot the values. It contains four variables that contains few information about the image. I am unable to get the results as it is shown in the paper using the GLCM, – Mayank Tiwari Mar 7 '17 at 15:55

As pointed out by A_A, you need to use the graycomatrix function to get the GLCM:
img = imread('http://www.ux.uis.no/~karlsk/ICTools/lena.bmp');