Well hello! I need to change size, and make bold the number that runs along the Yaxis while using plotyy. Here is a representative example:
if true
dom=(1:10);
dummy=sin(dom)*(9/5)-32;
[hax,h(1),h(2)]=plotyy(dom,sin(dom),dom,dummy);
set(gca, 'FontSize', 24)
set(hax,{'ycolor'},{'k';'k'})
set(hax(2),'Ylim',get(hax(1),'Ylim')*(9/5)-32);
set(hax(1),'box','off','LineWidth',2);
set(hax(2),'box','off','LineWidth',2,'fontsize',10);
set(h,'color','r','LineWidth',2)
end
As you can see, the basic plot with dual axis is done. From then on I can get everithing done, labels, titles, legends, boxing, latex interpreter, etc... BUT I can't change the number (-1, -0.5, 0) size not make it 'bold'
I've tried everything combining
if true
set(gca, 'FontSize', 24)
set(hax, 'FontSize', 24)
set(hax(1), 'FontSize', 24)
end
Any help? Plzzz THX in advance.

 채택된 답변

per isakson
per isakson 2014년 5월 18일
편집: per isakson 2014년 5월 18일

0 개 추천

This works as expected with R2013a
%%copy from documentation
figure
x = 0:0.01:20;
y1 = 200*exp(-0.05*x).*sin(x);
y2 = 0.8*exp(-0.5*x).*sin(10*x);
[AX,H1,H2] = plotyy(x,y1,x,y2,'plot');
set( AX, 'Fontsize', 24 )
and so does your examples. ???. The size of the x-tick-labels are changed together with the size of the y-tick-labels
.
Another possibility is to replace the tick-labels by text objects. See the FEX-contribution Format Tick Labels. There are several similar contributions. This approach provides a lot of flexibility.
.
BTW: you can avoid displaying the if true, end :
  • select the code (blue background)
  • click the {}Code button

댓글 수: 2

SASASA
SASASA 2014년 5월 18일
Well, there is something strange with my Matlab ( R2013 running in linux Mint) because this is how it looks like for me in matlab
But then if a export the file as pdf it does indeeed looks like:
So yeahh strange...
per isakson
per isakson 2014년 5월 18일
편집: per isakson 2014년 5월 18일
Yes, that's strange. Report to tech support.
A remaining possibility is to replace the tick-labels by text objects. See the FEX-contribution Format Tick Labels. There are several similar contributions. This approach provides a lot of flexibility.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Two y-axis에 대해 자세히 알아보기

질문:

2014년 5월 18일

편집:

2014년 5월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by