A question on Scatter PLot ???
Ältere Kommentare anzeigen
Hello Everyone ,
I have two arrays of each [10000x2] size. First Column of Data is X-Axis and Second Column is Y-Axis. Same goes with the Second Array too. I need to have a moving scatter plot. i.e I need to see the Data being plotted ,point by point. I tried using for loop and plot point by point for a single graph But it hangs .... Finally I found an answer from mathworks guy who posted a solution. It did worked and I need to do a workaround to that solution so that I can plot two arrays like same. *************************************************
V1 = rand(1,10000);
V2 = rand(1,10000);
N = NaN([1,10000]);
h = scatter(N, N , 'r*');
xdata1 = get(h, 'XData');
ydata1 = get(h, 'YData');
for lk = 1:10000
xdata1(lk) = V1(lk,1);
ydata1(lk) = V1(lk,2);
% Update the plot
set(h, 'XData', xdata1, 'YData', ydata1);
drawnow
end
***************************************************
If you execute this code, you will be seeing some points being plotted one-by -one.. Now I need the V2 plot on the same figure with different color marker.. like for black asterisk 'k*' .. I am not sure how to workaround by having a same figure handle with two different markers... Do u have any suggestions. ?
This is for analyzing the GPS location tracks .. So need it it MATLAB instead of Google Earth(KML)
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Graphics Performance finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!