plotting basically done
This commit is contained in:
@@ -14,3 +14,42 @@ ylabel('Count')
|
||||
set(gcf, 'PaperUnits', 'centimeters');
|
||||
set(gcf, 'PaperSize', [11.7 9.0]);
|
||||
set(gcf, 'PaperPosition',[0.0 0.0 11.7 9.0]);
|
||||
|
||||
% bar plot
|
||||
figure
|
||||
x = rand(10,1);
|
||||
gray = [.5,.5,.5];
|
||||
|
||||
bar(1, mean(x), 'EdgeColor','w','FaceColor', gray);
|
||||
hold on
|
||||
|
||||
bar(2, mean(x), 'EdgeColor','w','FaceColor', gray);
|
||||
plot(0*x + 2, x, 'ok');
|
||||
|
||||
bar(3, mean(x), 'EdgeColor','w','FaceColor', gray);
|
||||
errorbar(3, mean(x), std(x), 'ok');
|
||||
|
||||
bar(4, mean(x), 'EdgeColor','w','FaceColor', gray);
|
||||
errorbar(4, mean(x), std(x)/sqrt(length(x)), 'ok');
|
||||
set(gca, 'xtick',[])
|
||||
ylabel('uniformly distributed random data in [0,1]')
|
||||
box('off')
|
||||
title('different forms of bar plots')
|
||||
set(gcf, 'PaperUnits', 'centimeters');
|
||||
set(gcf, 'PaperSize', [11.7 9.0]);
|
||||
set(gcf, 'PaperPosition',[0.0 0.0 11.7 9.0]);
|
||||
hold off
|
||||
|
||||
% box plot
|
||||
figure
|
||||
x = rand(10,1);
|
||||
x(10) = 3;
|
||||
boxplot(x)
|
||||
set(gca, 'xtick',[])
|
||||
ylabel('data')
|
||||
box('off')
|
||||
title('box plot')
|
||||
set(gcf, 'PaperUnits', 'centimeters');
|
||||
set(gcf, 'PaperSize', [11.7 9.0]);
|
||||
set(gcf, 'PaperPosition',[0.0 0.0 11.7 9.0]);
|
||||
hold off
|
||||
|
||||
Reference in New Issue
Block a user