Intermingle data points in plot
1 view (last 30 days)
Show older comments
Hello,
I have three data categories, which I have to plot in one figure and I want them to be intermingled, ie I don't want the category plotted last to hide the underlying data points of the other categories. In each category there are up to 40000 data points. An obvious way is to go through the data points one by one and plot point 1 of category 1, then point 1 of category 2, point 1 of category 3, point 2 of category 1, etc. - which takes hours to days.
Is there a fast way to plot data points of different categories in an intermingled fashion? Or to plot them and afterwards bring a random subset of the points to the front?
Thank you!
Kem
0 Comments
Accepted Answer
Matt Fig
on 21 May 2011
It shouldn't take days to plot even that many points. Please give a small but succinct example which shows what you are doing. Something like:
cat1 = rand(3); % Three categories.
cat2 = rand(3);
cat3 = rand(3);
hold on
for ii = 1:3
plot3(cat1(ii,1),cat1(ii,2),cat1(ii,3),'*r');
plot3(cat2(ii,1),cat2(ii,2),cat2(ii,3),'*b');
plot3(cat3(ii,1),cat3(ii,2),cat3(ii,3),'*y');
end
0 Comments
More Answers (1)
See Also
Categories
Find more on Line Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!