change the y-axis value size

2 Ansichten (letzte 30 Tage)
sahar
sahar am 13 Jun. 2017
Kommentiert: dpb am 14 Jun. 2017
I want to change the size of y-axis values plotted with plotyy function. I attached the figure here. how can I do that?

Antworten (1)

dpb
dpb am 13 Jun. 2017
Bearbeitet: dpb am 14 Jun. 2017
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 Kommentare
sahar
sahar am 14 Jun. 2017
I want to change the font size of the right y axis not its range
dpb
dpb am 14 Jun. 2017
Ah, you didn't say that!!!... :)
set(hAx(2),'fontsize',YOURNEWFONTSIZE)

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Two y-axis finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by