Change of intensity of old points in animation
Show older comments
Hi,
I have three variable X, Y, Z of length 10000 points each .Z represent signal strength. I need to generate animated X,Y plot (scatter) with signal strength represented by color. For persistanace i am plotting 10 new color coded points each frame and making old points white . Code given below.
for i1 = 1:10:(numpoints-10),
plot(xP(1:i1-1),yP(1:i1-1),'w.','markersize',18) ;% Making old points to white
hold on
scatter(xP(i1+(0:9)),yP(i1+(0:9)),32,zP(i1+(0:9)),'filled') % Adding 10 new points for persistence
set(gca,'Color','k');
axis([xMin, xMax, yMin, yMax])
caxis([zMin, zMax])
hold off;
drawnow
end
Instead of making all the old points 'White' , I want to start with grey scale and increase an old point's intensity (alpha) every time, when any of newly added 10 point is same as old point. I would appreciate any suggesion in towards solution.
regards
jayant
Accepted Answer
More Answers (0)
Categories
Find more on Animation 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!