How can I earse Yticks when using Plot yyaxis
8 次查看(过去 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!