Different colors for scatter plot points based on the difference of x-y values
조회 수: 108 (최근 30일)
이전 댓글 표시
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
채택된 답변
Cris LaPierre
2021년 1월 19일
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:
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Scatter Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!