-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_two_baseline_h.m
More file actions
79 lines (65 loc) · 1.45 KB
/
test_two_baseline_h.m
File metadata and controls
79 lines (65 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
clear all
clc
clf
x1 = randn(1000,1);
x2 = randn(800,1);
hi_va1 = hist(x1,20);
hi_va1 = hi_va1./sum(hi_va1);
hi_va2 = hist(x2,18);
hi_va2 = hi_va2./sum(hi_va2)+0.3;
y1 = [1:20];
y2 = [11:28];
blv1 = 0.00;
blv2 = 0.3;
pl_ymax=0.5;% 4 plot
pl_xmax=0.5;
col_mm = jet(100);
subplot(2,3,1)
plot(y1,hi_va1,'b-');
hold on
plot(y2,hi_va2,'r-');
axis([-1 30 -0.1 0.5 ])
title('Original data');
subplot(2,3,2)
hb1 = bar(y1,hi_va1);
hold on
hb2 = bar(y2,hi_va2);
set(hb1,'Basevalue',blv1,'Facecolor','b');
set(hb2,'Basevalue',blv2,'Facecolor','r');
axis([-1 30 -0.1 0.5])
title('Original Bar')
subplot(2,3,3)
hold on
[hbar_va1]=fun_mm_bar_baseline(y1,hi_va1,blv1,0.5,pl_ymax,col_mm);
[hbar_va2]=fun_mm_bar_baseline(y2,hi_va2,blv2,0.5,pl_ymax,col_mm);
box on
axis([-1 30 -0.1 0.5])
caxis([0 pl_ymax])
colormap(col_mm)
% colorbar
title('mm function bar')
subplot(2,3,4)
plot(hi_va1,y1,'b-');
hold on
plot(hi_va2,y2,'r-');
axis([-0.1 0.5 -1 30 ])
title('Original data H');
subplot(2,3,5)
hb1 = barh(y1,hi_va1);
hold on
hb2 = barh(y2,hi_va2);
set(hb1,'Basevalue',blv1,'Facecolor','b');
set(hb2,'Basevalue',blv2,'Facecolor','r');
% axis([-1 30 -0.1 0.5])
title('Original Barh')
subplot(2,3,6)
hold on
[hbar_va1]=fun_mm_barh_baseline(hi_va1,y1,blv1,0.5,pl_xmax,col_mm);
[hbar_va2]=fun_mm_barh_baseline(hi_va2,y2,blv2,0.5,pl_xmax,col_mm);
box on
axis([-0.1 0.5 -1 30 ])
caxis([0 pl_xmax])
colormap(col_mm)
h=gcf;
fi_na='./fig_mm_bar_diff_base_line';
fun_work_li_035_myfig_out(h,fi_na,3)