How can I earse Yticks when using Plot yyaxis
조회 수: 9 (최근 30일)
이전 댓글 표시
Hi, I have a problem with yyaxis function.
I just want to show different yyaxis.
When I writing on command window, it works okay. But when I run the code it makes some problems.
How can I solve this problem
====================================================source code========================================
pos2 = [0.05 0.29 0.92 0.21];
axes('Position', pos2)
plot(X_Axis_Set, Distance)
hold on
plot(Point_Index, Distance(Point_Index),'s', 'MarkerFaceColor','red', 'MarkerSize',8)
yticks('auto')
hold off
yyaxis right
plot(Point_Index, Height(Point_Index),'s', 'MarkerFaceColor','red', 'MarkerSize',8)
hold on
plot(X_Axis_Set, Height, 'LineWidth', 1)
hold off
grid on;
grid minor;
yticks('auto')
fig_title = strcat(Date_Time,' -- Distance(Left, Blue) & Height(Right, Orange)');
title(fig_title)
====================================================figure========================================

Both left and right side there is clash yaxis..
Below is the one when i run on command window

댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Axis Labels에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!