Why is my plot missing lines?

6 views (last 30 days)
lil brain
lil brain on 2 Mar 2022
Commented: lil brain on 2 Mar 2022
Hi,
I have a matrix called comparisontable_abs and when I plot it using the plot() function, I get a plot which looks right but is missing two lines. Since the matrix comparisontable_abs contains 9 rows I expect there to be 9 lines but the plot only shows 6. Why is that?
Thanks!
My code:
plot(comparisontable_abs);
xlabel('Participants')
ylabel('Hurst exponent')
legend('head - balls glitch', 'left hand - balls glitch', 'right hand - balls glitch',...
'head - baskets glitch', 'right hand - baskets glitch', 'left hand - baskets glitch',...
'head - non-glitch', 'right hand - non-glitch', 'left hand - non-glitch')
grid on
title ('[HIGH] Difference in Hurst (distances) between ball, basket and no glitch')
newcolors = {'red','red','red','yellow','yellow','yellow','green','green','green'};
colororder(newcolors);

Accepted Answer

Davide Masiello
Davide Masiello on 2 Mar 2022
Edited: Davide Masiello on 2 Mar 2022
It actually plots 9 lines, but the 1st and 2nd are equal, and the same goes for the 4th and 5th, and 7th and 8th.
So they overlap in you plot.

More Answers (0)

Categories

Find more on Line Plots 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!