Edit: I have submitted this as a bug. I got suggestions for workarounds, but the problem remains.
My goal is to make some scatterplots with large numbers of points (10^4 ish) and have two of these plots in one figure side by side.
I had problems with MATLAB quitting when creating this plot, and reduced the problem down to the following example.
N = 200;
xx = linspace(0,1,N);
yy = xx;
[x,y] = meshgrid(xx,yy);
v = rand([N,N]);
bool = (v<0.01);
bool = bool(:);
fig = figure();
a1 = axes('position',[0,0,1,1]);
scatter(x(bool), y(bool), 10);
Some things that FIX the problem:
- Remove the explicit axes creation. However, I want this ability, since I want to place two axes next to one another.
- Don't print. However I need to print.
- Reduce the number of points. However, I can't be limited to 10^2.
- Modify the axes position to [0.1, 0.1, 0.8, 0.8].
I look forward to your collective insight.