0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 function test_iplot_2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 %% When cdata contains a matrix
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 c = ao(randn(10,10));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 c1 = ao(randn(10,10));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 c2 = ao(randn(10,10));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 iplot(c, plist('Markers', 'o', 'LineStyles', '--'))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 %% When cdata is complex
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 c = ao(complex(randn(1,100), randn(1,100)));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 iplot(c, plist('LineStyles', 'none', 'Markers', 'x'))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 %% Time-series with different start times
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20 pl = plist('waveform', 'sine wave', 'f', 0.1, 'fs', 10, 'nsecs', 20);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 a1 = ao(pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22 a1 = a1.setT0('2008-01-01 12:00:00.5');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 a2 = ao(pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 a2 = a2.setT0('2008-01-01 12:00:10');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 iplot(a1,a2, plist('arrangement', 'stacked'))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27 iplot(a1,a2, plist('arrangement', 'subplots'))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 iplot(a1,a2, plist('arrangement', 'single'))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 close all
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31 %% Set XRange for time-series
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 iplot(a1,a2, plist('arrangement', 'stacked', 'XRanges', [0 12]))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34 iplot(a1,a2, plist('arrangement', 'subplots', 'XRanges', {[0 12], [15 20]}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36 %% Set YRanges for time-series
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38 iplot(a1,a2, plist('arrangement', 'stacked', 'YRanges', [0 1]))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 iplot(a1,a2, plist('arrangement', 'subplots', 'YRanges', {[-1 1], [-2 2]}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 %% Set XRange for cdata
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 iplot(c, plist('arrangement', 'stacked', 'XRanges', [0 12]))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44 iplot(c, c, plist('arrangement', 'subplots', 'XRanges', {[0 1], [1 2]}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46 %% Set YRange for cdata
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48 iplot(c, plist('arrangement', 'stacked', 'YRanges', [0 1]))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 iplot(c, c, plist('arrangement', 'subplots', 'YRanges', {[-1 1], [-2 2]}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
51 %% Test 'all' line properties for cdata
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
52
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
53 iplot(c1, c1, plist('linecolors', {'ALL', 'c'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
54 iplot(c1, c2, plist('linewidths', {'all', 4}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
55 iplot(c1, c2, plist('linestyles', {'all', '--'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
56 iplot(c1, c2, plist('Markers', {'All', 'x'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
57
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
58 %% Test 'all' axes properties for tsdata
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
59
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
60 iplot(c1, c2, plist('Yscales', {'All', 'lin'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
61 iplot(abs(c1), abs(c2), plist('arrangement', 'subplots', 'Yscales', {'All', 'log'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
62 iplot(c1, c2, plist('arrangement', 'subplots', 'Xscales', {'All', 'lin'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
63 iplot(c1, c2, plist('arrangement', 'subplots', 'YRanges', {'All', [-3 10]}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
64
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
65 %% Test 'all' line properties for tsdata
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
66
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
67 iplot(a1, a2, plist('linecolors', {'ALL', 'c'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
68 iplot(a1, a2, plist('linewidths', {'all', 4}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
69 iplot(a1, a2, plist('linestyles', {'all', '--'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
70 iplot(a1, a2, plist('Markers', {'All', 'x'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
71 close all
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
72
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
73 %% Test 'all' axes properties for tsdata
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
74
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
75 iplot(a1, a2, plist('Yscales', {'All', 'lin'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
76 iplot(abs(a1), abs(a2), plist('arrangement', 'subplots', 'Yscales', {'All', 'log'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
77 iplot(a1, a2, plist('arrangement', 'subplots', 'Xscales', {'All', 'lin'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
78 iplot(a1, a2, plist('arrangement', 'subplots', 'YRanges', {'All', [-3 10]}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
79
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
80 %% Test 'all' line properties for fsdata
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
81
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
82 fsd1 = resp(miir(plist('type','lowpass','fs', 100)), plist('f', logspace(-4, log10(50), 1000)));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
83 fsd1 = fsd1.setYunits('m V^-1');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
84 fsd2 = psd(a1+a2);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
85 fsd3 = fsd2*10;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
86 fsd4 = resp(miir(plist('type', 'highpass')));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
87 fsd4 = fsd4.setYunits('m V^-1');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
88
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
89
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
90 iplot(fsd1, fsd2, fsd3, fsd4, plist('linecolors', {'ALL', 'c'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
91 iplot(fsd1, fsd2, fsd3, fsd4, plist('linewidths', {'all', 4}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
92 iplot(fsd1, fsd2, fsd3, fsd4, plist('linestyles', {'all', '--'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
93 iplot(fsd1, fsd2, fsd3, fsd4, plist('Markers', {'All', 'x'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
94 close all
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
95
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
96 %% Test 'all' axes properties for fsdata
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
97
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
98 iplot(fsd1, fsd2, fsd3, fsd4, plist('Yscales', {'All', 'lin'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
99 iplot(fsd1, fsd2, fsd3, fsd4, plist('arrangement', 'subplots', 'Yscales', {'All', 'log'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
100 iplot(fsd1, fsd2, fsd3, fsd4, plist('arrangement', 'subplots', 'Xscales', {'All', 'lin'}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
101 iplot(fsd1, fsd2, fsd3, fsd4, plist('arrangement', 'subplots', 'YRanges', {'All', [1e-6 100]}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
102
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
103
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
104 end |