A hole in the distribution of eigenvalues - is this real?

As far as I can tell, the problem is in how you're aggregating the eigenvalues into X and Y. j is incrementing by $4$ when it ought to be incrementing by $n = 10$, which has the effect of wiping out the smallest $6$ eigenvalues of almost every matrix, hence the hole. There's an easier way to do the aggregating that doesn't involve a j at all:

N = 10^4;
n = 10;
X = [];
Y = [];

for i = 1:N
    A = randn(n);
    E = eig(A);
    X = [X; real(E)];
    Y = [Y; imag(E)];
end

scatter(X, Y);

Because you are overwriting some of the eigenvalues by using the offset of 4 rather than 10, you are preferentially overwriting the smaller eigenvalues. This is confirmed in this SO selected answer, which states, for the Matlab algorithm:

The eigenvalues TEND to be in descending order, but this is not assured at all. They tend to be in order because the largest tend to trickle out of the algorithm on top. Eig has no sort at the end to ensure that fact.

So while it isn't purposely sorted in descending order, the algorithm has this effect.


Your plots instantly reminded me of something I'd seen before (click for a hi-res version):

Turns out that if your matrices have integer entries of bounded height, you do get holes, with the details depending on the distribution. What's more, there are all sorts of interesting and, to my knowledge, unsolved questions about this! More details here.

Given that real matrices can be approximated by rational ones, and bounded-height rationals can be multiplied by a sufficiently-large factor to give bounded-height integers, I wouldn't be surprised if there was some connection with the pattern you saw, even if it was only visible due to a bug.