How can i change the x-axis fontsize when using imhist?

6 views (last 30 days)
Hi, i am having problem with the font size when using imhist. If i run this:
imhist('imagename');
set(gca,'fontsize',14);
only the y-axis font size changes, while the x-axis font size remains the same. My question is how can i change the fontsize of the x-axis too? i've tried to do it manually in edit->axis properties but i can't do it (or i am not capable). Thank you in advance

Accepted Answer

jonas
jonas on 28 Mar 2018
Edited: jonas on 28 Mar 2018
imhist gives you two handles, one for the colorstripe and one for the axis. You need to access the properties of the colorstripe.
figure;
imhist(image);
ha=get(gcf,'children');
set(ha(1),'fontsize',14);

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!