Home > Mobile >  Label the actual data points in y-axis [MATLAB]
Label the actual data points in y-axis [MATLAB]

Time:09-17

I have a plot with two plotting by using yyaxis. The grid on the right yyaxis is currently aligned with the left yyaxis according to enter image description here

CodePudding user response:

You can use the axes YTick and YTickLabel properties. You would just need to be sure that the active side is the right one.

In your example, adding these lines would do the trick:

yyaxis('right');
set(gca,'YTick',[0, 2, 2.8, 5.6, 7, 8.4, 11, 11.2, 14]);
  • Related