MATLAB: How to change the line color in the output of imhist Image Processing Toolboximhist imhist provides the output in blue lines;i want to change it into say either red or green Best Answer For precise control, plot it yourself with bar() and then set the 'EdgeColor' and 'FaceColor' properties in the bar() function:img = imread('moon.tif');[counts, grayLevels] = imhist(img, 64);bar(grayLevels, counts, 'EdgeColor', 'r', 'FaceColor', 'c', 'BarWidth', 0.95);Makes cyan bars with red outlines. Related SolutionsMATLAB: Changing the histogram color If you want each bar in a different color, then try the attached demo (below in blue text). MATLAB: How to change color output of imhist function copyobj([rHist1, gHist1, bHist1], gca) Related QuestionHistogram Colors Not TrueI want to pop a new window in Matlab GUI.Plotting RGB histograms of images WITHOUT using the built-in function”imhist()”
Best Answer