Is there any way to use the right hand side of the y- axis graph to plot the curve?

 채택된 답변

KL
KL 2015년 4월 10일

0 개 추천

You can use YAxisLocation. Check the below link.

댓글 수: 2

kanyvt
kanyvt 2015년 4월 12일
Thanks for the link. But I don't really understand from it. Could you please write some syntax for the same?
x1 = [0:.1:40];
y1 = 4.*cos(x1)./(x1+2);
x2 = [1:.2:20];
y2 = x2.^2./x2.^3;
hl1 = line(x1,y1,'Color','r');
ax1 = gca;
set(ax1,'XColor','r','YColor','r')
ax2 = axes('XAxisLocation','top',...
'YAxisLocation','right',...
'Color','none',...
'XColor','k','YColor','k');
hl2 = line(x2,y2,'Color','k','Parent',ax2);

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품

질문:

2015년 4월 10일

댓글:

KL
2015년 4월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by