How can I earse Yticks when using Plot yyaxis
Show older comments
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

Answers (0)
Categories
Find more on Axis Labels in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!