Subplot Histogram Plotting Mistake
Ältere Kommentare anzeigen
Hello,
I am using that code at my project.
But I can't show histogram for my image. I added my result below too. Can you help me please?
Thank you
figure('Name','Org. Img + Histogram','NumberTitle','off');
subplot(2,1,1), imshow(org), title('Org. Img.');
subplot(2,1,2), imhist(org),title('Histogram of original image'), axis([0 270 0 8500]);

4 Kommentare
John Jimmy
am 20 Mai 2020
Walter Roberson
am 20 Mai 2020
It worked for me in my test:
org = imresize(imread('cameraman.tif'), [100 100]);
subplot(2,1,1), imshow(org), title('Org. Img.');
subplot(2,1,2), imhist(org),title('Histogram of original image'), axis([0 270 0 8500]);
(The histogram for this test is not empty; the counts are just not nearly as much as the 8500 you set as the axis limits)
John Jimmy
am 20 Mai 2020
John Jimmy
am 20 Mai 2020
Bearbeitet: John Jimmy
am 20 Mai 2020
Antworten (0)
Kategorien
Mehr zu Subplots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!