Sunday, 8 September 2013

Generating random correlated x and y points using Numpy

Generating random correlated x and y points using Numpy

I'd like to generate correlated arrays of x and y coordinates, in order to
test various matplotlib plotting approaches, but I'm failing somewhere,
because I can't get numpy.random.multivariate_normal to give me the
samples I want. Ideally, I want my x values between -0.51, and 51.2, and
my y values between 0.33 and 51.6 (though I suppose equal ranges would be
OK, since I can constrain the plot afterwards), but I'm not sure what mean
(0, 0?) and covariance values I should be using to get these samples from
the function.

No comments:

Post a Comment