Different colors for scatter plot points based on the difference of x-y values
20 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Giulia Mereu
am 19 Jan. 2021
Kommentiert: Giulia Mereu
am 19 Jan. 2021
Hello,
I have a scatter plot of two arrays, x and y. I need to distinguish the points in the plot with different colours based on the difference between x and y values. Hope someone can help me!
Thanks very much
0 Kommentare
Akzeptierte Antwort
Cris LaPierre
am 19 Jan. 2021
You will need to come up with a vector that contains the values you want to use to set the color of the points. Once you have that, pass it in as the 4th input using the following syntax:
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Scatter Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!