change the y-axis value size

조회 수: 2 (최근 30일)
sahar
sahar 2017년 6월 13일
댓글: dpb 2017년 6월 14일
I want to change the size of y-axis values plotted with plotyy function. I attached the figure here. how can I do that?

답변 (1개)

dpb
dpb 2017년 6월 13일
편집: dpb 2017년 6월 14일
You didn't show the code used to create the plot but the answer in general is to first save the handles to the two axes so you can subsequently modify them...
hAx=plotyy(x1,y1,x2,y2); % a 2-axes plot; save axes handles
ylim(hAx(1),[LftLoY LftHiY]) % invoke ylim() on LH axes
ylim(hAx(2),[RtLoY RtHiY]) % and RH
If you have more recent release, TMW recommends yyplot instead; it makes control of such elements a little more easily managed...
  댓글 수: 2
sahar
sahar 2017년 6월 14일
I want to change the font size of the right y axis not its range
dpb
dpb 2017년 6월 14일
Ah, you didn't say that!!!... :)
set(hAx(2),'fontsize',YOURNEWFONTSIZE)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Two y-axis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by