Fan-shaped scatter plot:
I need to generate fan-shaped scatter plots (like the one linked) with correlations between 0.1 and 0.9. So far, I've just added a cluster of dots at the right end of the plot, but this doesn't look that great and I cannot introduce enough variation to get down to a 0.1 correlation. I can only use 100 data points and the data must fall in the range of 0 - 100 in x and y values. Ideally, I want to be able to control the variation of the data points and/or the angle the fan-shape scatter plot forms. Any suggestions?
segment = linspace(0,10,33);
cluster = normrnd(10,2,1,67);
x = [segment, cluster]';
y = 2.*x + 1;
errors = [[normrnd(0, 4, length(segment), 1)]', [normrnd(0,9,length(cluster),1)]']'; %row vectors
y = y + errors;
figure
scatter(x,y)