How to avoid the mistake plot if one x value corresponding to two or more y values?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Dear all,
I am ploting the figures but there is a problem that I am encountering. I don't know how to solve it. Hope anyone can give me some tips. Appreciate.
wrong
correct
0 Commenti
Risposte (1)
the cyclist
il 3 Nov 2021
If the density of your points is high enough, you could consider plotting only the markers, and not the connecting lines, e.g.
plot(x,y,'.')
If that doesn't work, do you have a third variable that indicates the proper order to connect the points? If so, then sort x and y by that variable. If not, I don't know how one could know which points to connect.
2 Commenti
the cyclist
il 3 Nov 2021
I don't understand what you mean by "the third variable could be the order of each line". Do you mean your variable VarName3? Can you infer the variable ordering from it?
Vedere anche
Categorie
Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!