How can i change the font size of XTick and YTick (x axis and y axis) in histogram of a image?

382 ビュー (過去 30 日間)
suchismita
suchismita 2016 年 6 月 6 日
コメント済み: Pablo López 2021 年 6 月 2 日
I have a image as lena.jpg, from which i was trying to obtain hist graph.
x=imread('lena.jpg');
imhist(x);
set(gca,'FontSize',15);
with this code i am able to change the font size of YTick only but i want to change font size of both. how can i do that????
  2 件のコメント
Walter Roberson
Walter Roberson 2016 年 6 月 6 日
Which MATLAB version? The methods changed recently.
suchismita
suchismita 2016 年 6 月 6 日
編集済み: suchismita 2016 年 6 月 6 日
R2013a.... Windows 7....
i m attaching the result which i got....
i want to increase font size for both

サインインしてコメントする。

回答 (2 件)

KSSV
KSSV 2016 年 6 月 6 日
a = get(gca,'XTickLabel');
set(gca,'XTickLabel',a,'FontName','Times','fontsize',18)
  3 件のコメント
Amin Mohammed
Amin Mohammed 2020 年 4 月 7 日
It worked for me actually, even for both axes, I am using Matlab2014a.

サインインしてコメントする。


KSSV
KSSV 2016 年 6 月 6 日
編集済み: KSSV 2016 年 6 月 6 日
It is changing through gui of plot. Go to edit plot and click on axes, change font. But by code need to sort.

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by