Added figure for correlations

This commit is contained in:
Jan Benda 2015-10-22 15:56:16 +02:00
parent bb6453c183
commit 381542dad0
2 changed files with 8 additions and 5 deletions

View File

@ -6,10 +6,12 @@ y = randn(n, 1) + a*x;
%% (b) scatter plot:
subplot(1, 2, 1);
plot(x, a*x, 'r', 'linewidth', 4 );
plot(x, a*x, 'r', 'linewidth', 3 );
hold on
%scatter(x, y ); % either scatter ...
plot(x, y, 'o' ); % ... or plot - same plot.
plot(x, y, 'o', 'markersize', 2 ); % ... or plot - same plot.
xlim([-4 4])
ylim([-4 4])
xlabel('x')
ylabel('y')
hold off
@ -48,8 +50,9 @@ hold on;
bar(b, h, 'facecolor', 'b');
bar(b(b>=rq), h(b>=rq), 'facecolor', 'r');
plot( [rd rd], [0 4], 'r', 'linewidth', 2 );
xlabel('correlation coefficient');
ylabel('probability density of H0');
xlim([-0.2 0.2])
xlabel('Correlation coefficient');
ylabel('Probability density of H0');
hold off;
savefigpdf( gcf, 'correlationsignificance.pdf', 12, 7 );
savefigpdf( gcf, 'correlationsignificance.pdf', 12, 6 );

Binary file not shown.