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.

采纳的回答

Walter Roberson
Walter Roberson 2016-2-18
For each scattergroup object (the result of one call to scatter), for N points you have:
  • 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'
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 个)

类别

Help CenterFile Exchange 中查找有关 Scatter Plots 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by