0
$\begingroup$

How can I generate fake data that resembles this real data from a youtube video:

enter image description here

The following is my attempt to do so:

N=100;

x_r1 = .1 * randn(N,1)+3.6;
x_i1 = .1 * randn(N,1)+4.05;

x_r2 = .1 * randn(N,1)+6.25;
x_i2 = .1 * randn(N,1)+3.1;


x1 = x_r1;
y1 = 2 * x1+randn(N,1);

x2 = x_r2;
y2 = .4* x2 + randn(N,1);

figure(1)
h = gscatter([x1; x2],[y1;y2],[ones(N,1); 2*ones(N,1)]);
xlim([0 10])
ylim([-1 10])
hold on
xlabel('Red Blood Cell Volume')
ylabel('Red Blod Cell Hemoglobin Concentration')

The output of my code is: enter image description here

Clearly this could be better. For one, I'm not sure how to introduce that angle which the real data appears to have (i.e. the major axis of the red and blue ellipses seem to have an angle for about 30 or 40 degrees away from the x-axis of the graph).

Is there a better way to do this?

$\endgroup$