how to keep labels in matlab with multiplotyyy function ?

조회 수: 1 (최근 30일)
Jeevan Kumar Bodaballa
Jeevan Kumar Bodaballa 2019년 12월 31일
댓글: Jeevan Kumar Bodaballa 2020년 1월 7일
I am trying to use multiplotyyy.m function and it's succefully working. Though I can't keep xlabel and xtickangle. Can anyone tell me where I have to modify the plotyyy.m file for xlabel and xtckangle.
Also I would like to know modify line colours aswell.

답변 (1개)

Jeremy
Jeremy 2019년 12월 31일
x = linspace(1,10,201);
y1 = x.^2;
y2 = log(x);
pyh = plotyy(x,y1,x,y2);
legend('x^2','ln(x)')
ax = gca;
xlabel('x')
ax.XTickLabelRotation = 45;
pyh(1).Children.Color = [0 1 0];
pyh(1).YColor = [0 1 0];
pyh(2).Children.Color = [0 0 1];
pyh(2).YColor = [0 0 1];
  댓글 수: 6
Jeremy
Jeremy 2020년 1월 2일
What is the exact line where you call your plotting function?
mpy.png

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

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by