JmJ
JmJ

Reputation: 2098

Most suitable graph for displaying coordinate data

I have extracted some sets of matrices from a CSV file that comes from recording data (X,Y) every N seconds in a C++ application.

In my C++ application I was tracking two objects and saving the coordinates of both in my CSV file like so:

x1, y1, x2, y2    
x1, y1, x2, y2
...

I would like to display both objects (x,y)1 and (x,y)2 in the same graph at the same time, but scatter does not seem to allow this.

Something like the following would be ideal:

scatter(Log1(:,1),Log1(:,2), Log1(:,3),Log1(:,4))

Upvotes: 1

Views: 40

Answers (1)

Ander Biguri
Ander Biguri

Reputation: 35525

Use holdon.

Something like

scatter(Log1(:,1),Log1(:,2));
hold on
scatter(Log1(:,3),Log1(:,4));

Upvotes: 3

Related Questions