tomwalters@0
|
1 % procedure for 'aim-mat'
|
tomwalters@0
|
2 %
|
tomwalters@0
|
3 % INPUT VALUES:
|
tomwalters@0
|
4 %
|
tomwalters@0
|
5 % RETURN VALUE:
|
tomwalters@0
|
6 %
|
tomwalters@0
|
7 % load the signal file and all files, that are in this directory
|
tomwalters@0
|
8 % set the project variables accordingly.
|
tomwalters@0
|
9 %
|
bleeck@3
|
10 %
|
bleeck@3
|
11 % (c) 2011, University of Southampton
|
bleeck@3
|
12 % Maintained by Stefan Bleeck (bleeck@gmail.com)
|
bleeck@3
|
13 % download of current version is on the soundsoftware site:
|
bleeck@3
|
14 % http://code.soundsoftware.ac.uk/projects/aimmat
|
bleeck@3
|
15 % documentation and everything is on http://www.acousticscale.org
|
bleeck@3
|
16
|
bleeck@3
|
17
|
tomwalters@0
|
18
|
tomwalters@0
|
19 function [myaxes1,myaxes2,myaxes3,myaxes4]=aim_define_plot_areas(handles,relative_axis,options)
|
tomwalters@0
|
20
|
tomwalters@0
|
21 withtime=options.withtime;
|
tomwalters@0
|
22 withfre=options.withfre;
|
tomwalters@0
|
23 withsignal=options.withsignal;
|
tomwalters@0
|
24
|
tomwalters@0
|
25 current_plot=handles.info.current_plot;
|
tomwalters@0
|
26
|
tomwalters@0
|
27 % calculate the position of the axes according to the tick-settings
|
tomwalters@0
|
28 % find out, which graphic we want:
|
tomwalters@0
|
29 if ~withtime && ~withfre && ~withsignal
|
tomwalters@0
|
30 graphiccase=1;
|
tomwalters@0
|
31 else if ~withtime && ~withfre && withsignal
|
tomwalters@0
|
32 if current_plot==1
|
tomwalters@0
|
33 graphiccase=8;
|
tomwalters@0
|
34 else
|
tomwalters@0
|
35 graphiccase=2;
|
tomwalters@0
|
36 end
|
tomwalters@0
|
37 else if withtime && ~withfre && withsignal
|
tomwalters@0
|
38 graphiccase=3;
|
tomwalters@0
|
39 else if withtime && withfre && withsignal
|
tomwalters@0
|
40 graphiccase=4;
|
tomwalters@0
|
41 else if ~withtime && withfre && ~withsignal
|
tomwalters@0
|
42 graphiccase=5;
|
tomwalters@0
|
43 else if ~withtime && withfre && withsignal
|
tomwalters@0
|
44 graphiccase=6;
|
tomwalters@0
|
45 else if withtime && withfre && ~withsignal
|
tomwalters@0
|
46 graphiccase=7;
|
tomwalters@0
|
47 else if withtime && ~withfre && ~withsignal
|
tomwalters@0
|
48 graphiccase=9;
|
tomwalters@0
|
49 end
|
tomwalters@0
|
50 end
|
tomwalters@0
|
51 end
|
tomwalters@0
|
52 end
|
tomwalters@0
|
53 end
|
tomwalters@0
|
54 end
|
tomwalters@0
|
55 end
|
tomwalters@0
|
56 end
|
tomwalters@0
|
57
|
tomwalters@0
|
58
|
tomwalters@0
|
59 off=0.002; % between graphics
|
tomwalters@0
|
60 % width without frequency profile:
|
tomwalters@0
|
61 b11=0.96;
|
tomwalters@0
|
62 % width left and right with frequency profile:
|
tomwalters@0
|
63 b21=0.87-off;
|
tomwalters@0
|
64 b22=0.12; boff22=0.87-off;
|
tomwalters@0
|
65
|
tomwalters@0
|
66 % height signal without main or temp profile
|
tomwalters@0
|
67 h11=1;
|
tomwalters@0
|
68 % height signal with main window
|
tomwalters@0
|
69 h21=0.2; hoff21=0.8+off;
|
tomwalters@0
|
70 h22=0.8;
|
tomwalters@0
|
71 % height temp profile with main window
|
tomwalters@0
|
72 h21a=0.8; hoff21a=0.2+off;
|
tomwalters@0
|
73 h22a=0.2;
|
tomwalters@0
|
74
|
tomwalters@0
|
75 % height signal with main window and temporal profile
|
tomwalters@0
|
76 h31=0.15; hoff31=0.85+off+off+off;
|
tomwalters@0
|
77 h32=0.7; hoff32=0.15+off;
|
tomwalters@0
|
78 h33=0.15;
|
tomwalters@0
|
79
|
tomwalters@0
|
80 if strcmp(handles.screen_modus,'paper')
|
tomwalters@0
|
81 off=0.001; % between graphics
|
tomwalters@0
|
82 % width without frequency profile:
|
tomwalters@0
|
83 b11=0.95;
|
tomwalters@0
|
84 % width left and right with frequency profile:
|
tomwalters@0
|
85 b21=0.83-off;
|
tomwalters@0
|
86 b22=0.12; boff22=0.83-off;
|
tomwalters@0
|
87
|
tomwalters@0
|
88 % height signal without main or temp profile
|
tomwalters@0
|
89 h11=1;
|
tomwalters@0
|
90 % height signal with main window
|
tomwalters@0
|
91 h21=0.2; hoff21=0.75+off;
|
tomwalters@0
|
92 h22=0.75;
|
tomwalters@0
|
93 % height temp profile with main window
|
tomwalters@0
|
94 h21a=0.8; hoff21a=0.2+off;
|
tomwalters@0
|
95 h22a=0.2;
|
tomwalters@0
|
96
|
tomwalters@0
|
97 % height signal with main window and temporal profile
|
tomwalters@0
|
98 h31=0.15; hoff31=0.83+off+off+off;
|
tomwalters@0
|
99 h32=0.68; hoff32=0.15+off;
|
tomwalters@0
|
100 h33=0.15;
|
tomwalters@0
|
101 end
|
tomwalters@0
|
102
|
tomwalters@0
|
103
|
tomwalters@0
|
104 switch graphiccase
|
tomwalters@0
|
105 case 1
|
tomwalters@0
|
106 axpos2=[0,0,b11,h11];
|
tomwalters@0
|
107 case 2
|
tomwalters@0
|
108 axpos1=[0,hoff21,b11,h21];
|
tomwalters@0
|
109 axpos2=[0,0,b11,h22];
|
tomwalters@0
|
110 case 3
|
tomwalters@0
|
111 axpos1=[0,hoff31,b11,h31];
|
tomwalters@0
|
112 axpos2=[0,hoff32,b11,h32];
|
tomwalters@0
|
113 axpos3=[0,0,b11,h33];
|
tomwalters@0
|
114 case 4
|
tomwalters@0
|
115 axpos1=[0,hoff31,b21,h31];
|
tomwalters@0
|
116 axpos2=[0,hoff32,b21,h32];
|
tomwalters@0
|
117 axpos3=[0,0,b21,h33];
|
tomwalters@0
|
118 axpos4=[boff22,hoff32+off,b22,h32];
|
tomwalters@0
|
119 case 5
|
tomwalters@0
|
120 axpos2=[0,0,b21,h11];
|
tomwalters@0
|
121 axpos4=[boff22,0,b22,h11];
|
tomwalters@0
|
122 case 6
|
tomwalters@0
|
123 axpos1=[0,hoff21,b21,h21];
|
tomwalters@0
|
124 axpos2=[0,0,b21,h22];
|
tomwalters@0
|
125 axpos4=[boff22,0 ,b22,h22];
|
tomwalters@0
|
126 case 7
|
tomwalters@0
|
127 axpos2=[0,hoff21a,b21,h21a];
|
tomwalters@0
|
128 axpos3=[0,0,b21,h22a];
|
tomwalters@0
|
129 axpos4=[boff22,hoff21a,b22,h21a];
|
tomwalters@0
|
130 case 9
|
tomwalters@0
|
131 axpos2=[0,hoff21a,b11,h21a];
|
tomwalters@0
|
132 axpos3=[0,0,b11,h22a];
|
tomwalters@0
|
133 otherwise
|
tomwalters@0
|
134 axpos1=[0,hoff21,b11,h21];
|
tomwalters@0
|
135 end
|
tomwalters@0
|
136
|
tomwalters@0
|
137 ra=relative_axis;
|
tomwalters@0
|
138 % put a little space to the left side:
|
tomwalters@0
|
139 ra(1)=ra(1)+0.015;
|
tomwalters@0
|
140 if strcmp(handles.screen_modus,'paper')
|
tomwalters@0
|
141 ra(2)=ra(2)+0.015;
|
tomwalters@0
|
142 end
|
tomwalters@0
|
143 if exist('axpos1','var')
|
tomwalters@0
|
144 myaxes1=subplot('Position',[ra(1)+(axpos1(1)*ra(3)) ra(2)+(axpos1(2)*ra(4)) ra(3)*axpos1(3) ra(4)*axpos1(4)] );
|
tomwalters@0
|
145 set(myaxes1,'Visible','on');
|
tomwalters@0
|
146 cla;
|
tomwalters@0
|
147 else
|
tomwalters@0
|
148 myaxes1=[];
|
tomwalters@0
|
149 end
|
tomwalters@0
|
150 if exist('axpos2','var')
|
tomwalters@0
|
151 myaxes2=subplot('Position',[ra(1)+(axpos2(1)*ra(3)) ra(2)+(axpos2(2)*ra(4)) ra(3)*axpos2(3) ra(4)*axpos2(4)] );
|
tomwalters@0
|
152 set(myaxes2,'Visible','on');
|
tomwalters@0
|
153 % cla;
|
tomwalters@0
|
154 else
|
tomwalters@0
|
155 myaxes2=[];
|
tomwalters@0
|
156 end
|
tomwalters@0
|
157 if exist('axpos3','var')
|
tomwalters@0
|
158 myaxes3=subplot('Position',[ra(1)+(axpos3(1)*ra(3)) ra(2)+(axpos3(2)*ra(4)) ra(3)*axpos3(3) ra(4)*axpos3(4)] );
|
tomwalters@0
|
159 set(myaxes3,'Visible','on');
|
tomwalters@0
|
160 % cla;
|
tomwalters@0
|
161 else
|
tomwalters@0
|
162 myaxes3=[];
|
tomwalters@0
|
163 end
|
tomwalters@0
|
164 if exist('axpos4','var')
|
tomwalters@0
|
165 myaxes4=subplot('Position',[ra(1)+(axpos4(1)*ra(3)) ra(2)+(axpos4(2)*ra(4)) ra(3)*axpos4(3) ra(4)*axpos4(4)] );
|
tomwalters@0
|
166 set(myaxes4,'Visible','on');
|
tomwalters@0
|
167 cla;
|
tomwalters@0
|
168 else
|
tomwalters@0
|
169 myaxes4=[];
|
tomwalters@0
|
170 end |