- Marker can be only one string such as 'o' or 'square'
- SizeData can be a vector of length N, one per point
- MarkerFaceColor can be 'none', or 'flat', or 'auto', or a single string naming a color to be used for all points, or a single RGB triple to be used for all points. The default is 'none' and 'auto' has the same effect as 'none'. If 'flat' is chosen then CData is used
- MarkerEdgeColor can be 'none', or 'flat', or 'auto', or a single string naming a color to be used for all points, or a single RGB triple to be used for all points. The default is 'flat', and 'auto' has the same effect as 'none'. If 'flat' is chosen then CData is used
- CData can be an Nx3 array of colors, one per point. It has no effect unless one of MarkerEdgeColor or MarkerFaceColor is 'flat'
using scatter function with distinguishing 32 scatter plots in 1 figure
조회 수: 1 (최근 30일)
이전 댓글 표시
I have 32 vectors and another 32 vectors which are need to be plotted with scatter function against to each other. How can I use scatter function to properly distinguish each vector in 1 figure? I tried following way;
figure;
scatter(vector_1, vector_2, 'b^')
hold on;
scatter(vector_2, vector_3, 'r^')
.......
But the total number of color and/or marker symbol are not enough to append each vector differently.
댓글 수: 0
채택된 답변
Walter Roberson
2016년 2월 18일
For each scattergroup object (the result of one call to scatter), for N points you have:
Therefore for any one call to scatter, you can set a different color for each point and you can set a different size for each point, but the call can only have one MarkerEdgeColor and one Marker shape.
There are 7 relatively distinguishable colors, 'r', 'g', 'b', 'c', 'm', 'k', 'y' (white, 'w', is typically not distinguishable)
There are 9 relatively distinguishable shapes, '*', '+', '^', 'v', '<', '>', 'o', 'x', 's' (square), and there are also 'p' (pentagon) and 'h' (hexagon) which tend to be harder to make out unless larger marker sizes are used
The obvious color and shape combinations alone give 63 combinations.
To those you can also add marker edge colors. However, I tend to find that not many of those combinations are easily to read.
I do not tend to use marker size to distinguish datasets: I tend to use marker size to indicate significance or proportion of some kind.
댓글 수: 0
추가 답변 (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!