comparison toolboxes/MIRtoolbox1.3.2/somtoolbox/vis_show_gui_comp.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function vis_show_gui_comp(h, indx, action,varargin)
2
3 %VIS_SHOW_GUI_COMP is a subfunction of SOM_SHOW_GUI.
4 %
5 % vis_show_gui_comp(handle, indx, action, varargin)
6 %
7 % Input arguments:
8 % handle (struct)
9 % indx (scalar)
10 % action (string)
11 % varargin (varies)
12 %
13 % See also SOM_SHOW_GUI.
14
15 % Copyright (c) 2000 by Roman Feldman and Juha Vesanto
16 % Contributed to SOM Toolbox on August 22nd, 2000
17 % http://www.cis.hut.fi/projects/somtoolbox/
18
19 % Version 2.0beta roman 160800 juuso 220800
20
21 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22 % MAIN %
23 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
24
25 udata = get(h,'UserData');
26 plot_array = udata.plot_array;
27 l = length(plot_array);
28
29 %%%%%%
30 % init %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
31 %%%%%%
32
33 if (strcmp(action,'init'))
34
35 %--- color vars ---
36 fig_color = [0.8 0.8 0.8];
37 bg_color1 = [0.701960784313725 0.701960784313725 0.701960784313725];
38 bg_color2 = [0.9 0.9 0.9];
39 %--- object position vars (in pixels) ---
40 % calculations based on case 'comp'
41 %% hint text
42 hint_dist1 = 98.17-(61.27+36.9); % hint text lower edge and next lower frame upper edge
43 hint_dist2 = 123-(98.17+18.45); % figure upper edge and hint text upper edge
44 %% general
45 dist1 = 67.42-61.27; % general distance between frame edge and object in frame
46 %% frame + ok / cancel
47 frames_dist = 61.27-(8.38+36.9);
48 frames_dist2 = 8.38;
49 f_fr = [7.9 8.38 216.2 36.9]; % final frame
50 ok_pb = [17.1 15.76 75.9 22.14];
51 cancel_pb = [139 15.76 75.9 22.14];
52 %% objects
53 hint_txt = [230 18.45]; % hint text width and height
54 interp_cb = [98.9 24.6];
55 title_txt = [35 hint_txt(2)];
56 title_edit_h = 23.083;
57 var_pop = interp_cb;
58 list_lt = [130 130];
59 calc_txt = [list_lt(1) hint_txt(2)];
60 useall_pb = [50 interp_cb(2)];
61
62 if (length(indx) > 1)
63 errordlg({'Same options for multiple subplots', ...
64 'not yet available'},'Error in SOM_VIS: options');
65 return;
66
67 elseif (isempty(plot_array(1).args))
68 errordlg({'Try to select subplot first'}, ...
69 'Error in SOM_VIS: options');
70 return;
71
72 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
73 % 'comp'
74 %
75 elseif (strncmp('comp',plot_array(indx).args{1},4))
76 old_fig_n = watchon;
77 W = 230; H = 123;
78 units = get(h,'units');
79 set(h,'units','pixels');
80 fp = get(h,'Position');
81 fig_pos = [(fp(1)+fp(3)) ...
82 (fp(2)+fp(2)+fp(4)/2-H/2) ...
83 W ...
84 H];
85 o1 = sum(f_fr([2 4]))+frames_dist;
86 o2 = o1+dist1;
87 o3 = 2*dist1+interp_cb(2);
88 o4 = o1+o3+hint_dist1;
89 hint_text_pos = [1 o4 hint_txt];
90 frame1_pos = [f_fr(1) o1 f_fr(3) o3];
91 interp_pos = [ok_pb(1) o2 interp_cb];
92 frame2_pos = f_fr;
93 ok_pos = ok_pb;
94 cancel_pos = cancel_pb;
95
96 fig_h = figure( ...
97 'Units','pixels', ...
98 'Position', fig_pos, ...
99 'Color',fig_color, ...
100 'NumberTitle','off', ...
101 'Name','component', ...
102 'MenuBar','none', ...
103 'Visible','off');
104
105 set( ...
106 uicontrol( ... %% hint
107 'Units','pixels', ...
108 'BackgroundColor',fig_color, ...
109 'HorizontalAlignment','center', ...
110 'Position',hint_text_pos, ...
111 'String','Options for component plane', ...
112 'Style','text'),'units','normalized');
113
114 set( ...
115 uicontrol( ... %% [frame]
116 'Units','pixels', ...
117 'Position',frame1_pos, ...
118 'Style','frame'),'units','normalized');
119
120 pr = udata.property{indx};
121 chkb_h = uicontrol( ... %% interpolated
122 'Units','pixels', ...
123 'HorizontalAlignment','center', ...
124 'Position',interp_pos, ...
125 'Style','checkbox', ...
126 'String','interpolated', ...
127 'Value',pr{1});
128 set(chkb_h,'units','normalized');
129
130 set( ...
131 uicontrol( ... %% [frame]
132 'Units','pixels', ...
133 'Position',frame2_pos, ...
134 'Style','frame'),'units','normalized');
135
136 s = ['vis_show_gui_comp(', ...
137 mat2str(h), ',', mat2str(indx), ...
138 ',''comp'',' mat2str(fig_h) ')'];
139 set( ...
140 uicontrol( ... %% OK
141 'Units','pixels', ...
142 'Position',ok_pos, ...
143 'String','OK', ...
144 'Callback',s),'units','normalized');
145
146 set( ...
147 uicontrol( ... %% Cancel
148 'Units','pixels', ...
149 'Position',cancel_pos, ...
150 'String','Cancel', ...
151 'Callback',['close(' mat2str(fig_h) ')']),'units','normalized');
152
153 watchoff(old_fig_n);
154 tmp_udata = [chkb_h];
155 set(fig_h,'units','normalized', ...
156 'Visible','on', ...
157 'UserData',tmp_udata, ...
158 'handlevisibility','off');
159
160 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
161 % 'umat'
162 %
163 elseif (strncmp('umat',plot_array(indx).args{1},4))
164 old_fig_n = watchon;
165 W = 230; H = 335.893;
166 units = get(h,'units');
167 set(h,'units','pixels');
168 fp = get(h,'Position');
169 fig_pos = [(fp(1)+fp(3)) ...
170 (fp(2)+fp(2)+fp(4)/2-H/2) ...
171 W ...
172 H];
173 o1 = sum(f_fr([2 4]))+frames_dist;
174 o2 = o1+dist1;
175 o3 = 2*dist1+list_lt(2)+calc_txt(2);
176 o4 = o2+list_lt(2);
177 o5 = sum(cancel_pb([1 3]))-useall_pb(1);
178 o6 = o2+o3/2-useall_pb(2)/2;
179 o7 = o1+o3+frames_dist2;
180 o8 = 2*dist1+interp_cb(2);
181 o9 = o7+dist1;
182 o10 = o7+o8+frames_dist2;;
183 o11 = 2*dist1+max(title_edit_h,title_txt(2));
184 o12 = W-(title_txt(1)+2*ok_pb(1));
185 o13 = o10+dist1+(title_edit_h-title_txt(2))/2;
186 o14 = o10+dist1;
187 if title_txt(2)>title_edit_h,
188 o13 = o10+dist1;
189 o14 = o13+(title_edit_h-title_txt(2))/2;
190 end
191 o15 = ok_pb(1)+title_txt(1);
192 o16 = o10+o11+hint_dist1;
193 hint_text_pos = [1 o16 hint_txt];
194 frame1_pos = [f_fr(1) o10 f_fr(3) o11];
195 title_text_pos = [ok_pb(1) o13 title_txt];
196 title_pos = [o15 o14 o12 title_edit_h];
197 frame2_pos = [f_fr(1) o7 f_fr(3) o8];
198 interp_pos = [ok_pb(1) o9 interp_cb];
199 frame3_pos = [f_fr(1) o1 f_fr(3) o3];
200 list_text_pos = [ok_pb(1) o4 calc_txt];
201 list_pos = [ok_pb(1) o2 list_lt];
202 use_all_pos = [o5 o6 useall_pb];
203 frame4_pos = f_fr;
204 ok_pos = ok_pb;
205 cancel_pos = cancel_pb;
206
207 fig_h = figure( ...
208 'Units','pixels', ...
209 'Position', fig_pos, ...
210 'Color',fig_color, ...
211 'NumberTitle','off', ...
212 'Name','U-matrix', ...
213 'MenuBar','none', ...
214 'Visible','off');
215
216 set( ...
217 uicontrol( ... %% hint
218 'Units','pixels', ...
219 'BackgroundColor',fig_color, ...
220 'HorizontalAlignment','center', ...
221 'Position',hint_text_pos, ...
222 'String','Options for U-matrix', ...
223 'Style','text'),'units','normalized');
224
225 set( ...
226 uicontrol( ... %% [frame]
227 'Units','pixels', ...
228 'Position',frame1_pos, ...
229 'Style','frame'),'units','normalized');
230
231 set( ...
232 uicontrol( ... %% title
233 'Units','pixels', ...
234 'Position',title_text_pos, ...
235 'BackgroundColor',bg_color1, ...
236 'HorizontalAlignment','left', ...
237 'Style','text', ...
238 'String','Title'),'units','normalized');
239
240 pr = udata.property{indx};
241 ed_h = uicontrol( ... %% [edit]
242 'Units','pixels', ...
243 'Position',title_pos, ...
244 'FontSize',12, ...
245 'Style','edit', ...
246 'String',pr{2}, ...
247 'BackgroundColor',bg_color2);
248 set(ed_h,'units','normalized');
249
250 set( ...
251 uicontrol( ... %% [frame]
252 'Units','pixels', ...
253 'Position',frame2_pos, ...
254 'Style','frame'),'units','normalized');
255
256 chkb_h = uicontrol( ... %% interpolated
257 'Units','pixels', ...
258 'Position',interp_pos, ...
259 'Style','checkbox', ...
260 'String','interpolated', ...
261 'Value',pr{1});
262 set(chkb_h,'units','normalized');
263
264 set( ...
265 uicontrol( ... %% [frame]
266 'Units','pixels', ...
267 'Position',frame3_pos, ...
268 'Style','frame'),'units','normalized');
269
270 set( ...
271 uicontrol( ... %% calculated from
272 'Units','pixels', ...
273 'BackgroundColor',bg_color1, ...
274 'HorizontalAlignment','left', ...
275 'Position',list_text_pos, ...
276 'String','calculated from', ...
277 'Style','text'),'units','normalized');
278
279 list1_h = uicontrol( ... %% [listbox]
280 'Units','pixels', ...
281 'BackgroundColor',bg_color2, ...
282 'Position',list_pos, ...
283 'String',udata.sM.comp_names, ...
284 'Style','listbox', ...
285 'Max',2, ...
286 'Value',pr{3});
287 set(list1_h,'units','normalized');
288
289 s = ['tmp=get(' mat2str(fig_h) ',''userdata'');set(tmp(3),''value'',' ...
290 mat2str(1:length(udata.sM.comp_names)) ');'];
291 set( ...
292 uicontrol( ... %% Use all
293 'Units','pixels', ...
294 'Position',use_all_pos, ...
295 'String','Use all', ...
296 'Callback',s),'units','normalized');
297
298 set( ...
299 uicontrol( ... %% [frame]
300 'Units','pixels', ...
301 'Position',frame4_pos, ...
302 'Style','frame'),'units','normalized');
303
304 s = ['vis_show_gui_comp(' ...
305 mat2str(h) ',' mat2str(indx) ...
306 ',''umat'',' mat2str(fig_h) ')'];
307 set( ...
308 uicontrol( ... %% OK
309 'Units','pixels', ...
310 'Position',ok_pos, ...
311 'String','OK', ...
312 'Callback',s),'units','normalized');
313
314 set( ...
315 uicontrol( ... %% Cancel
316 'Units','pixels', ...
317 'Position',cancel_pos, ...
318 'String','Cancel', ...
319 'Callback',['close(' mat2str(fig_h) ')']),'units','normalized');
320
321 watchoff(old_fig_n);
322 tmp_udata = [chkb_h ed_h list1_h];
323 set(fig_h,'units','normalized', ...
324 'Visible','on', ...
325 'UserData', tmp_udata, ...
326 'handlevisibility','off');
327
328 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
329 % 'color'
330 %
331 elseif (strncmp('color',plot_array(indx).args{1},5))
332 old_fig_n = watchon;
333 W = 230; H = 212.043;
334 units = get(h,'units');
335 set(h,'units','pixels');
336 fp = get(h,'Position');
337 fig_pos = [(fp(1)+fp(3)) ...
338 (fp(2)+fp(2)+fp(4)/2-H/2) ...
339 W ...
340 H];
341 o1 = sum(f_fr([2 4]))+frames_dist;
342 o2 = o1+dist1;
343 o3 = 2*dist1+var_pop(2);
344 o4 = o1+o3+frames_dist2;
345 o5 = o4+dist1;
346 o6 = 2*dist1+interp_cb(2);
347 o7 = o4+o6+frames_dist2;
348 o8 = 2*dist1+max(title_edit_h,title_txt(2));
349 o9 = W-(title_txt(1)+2*ok_pb(1));
350 o10 = o7+dist1+(title_edit_h-title_txt(2))/2;
351 o11 = o7+dist1;
352 if title_txt(2)>title_edit_h,
353 o10 = o7+dist1;
354 o11 = o10+(title_edit_h-title_txt(2))/2;
355 end
356 o12 = ok_pb(1)+title_txt(1);
357 o13 = o7+o8+hint_dist1;
358 hint_text_pos = [1 o13 hint_txt];
359 frame1_pos = [f_fr(1) o7 f_fr(3) o8];
360 title_text_pos = [ok_pb(1) o10 title_txt];
361 title_pos = [o12 o11 o9 title_edit_h];
362 frame2_pos = [f_fr(1) o4 f_fr(3) o6];
363 interp_pos = [ok_pb(1) o5 interp_cb];
364 frame3_pos = [f_fr(1) o1 f_fr(3) o3];
365 popup_pos = [ok_pb(1) o2 var_pop];
366 frame4_pos = f_fr;
367 ok_pos = ok_pb;
368 cancel_pos = cancel_pb;
369
370 fig_h = figure( ...
371 'Units','pixels', ...
372 'Position',fig_pos, ...
373 'Color',fig_color, ...
374 'NumberTitle','off', ...
375 'Name','color plane', ...
376 'MenuBar','none', ...
377 'Visible','off');
378
379 set( ...
380 uicontrol( ... %% hint
381 'Units','pixels', ...
382 'BackgroundColor',fig_color, ...
383 'HorizontalAlignment','center', ...
384 'Position',hint_text_pos, ...
385 'String','Options for colorplane', ...
386 'Style','text'),'units','normalized');
387
388 set( ...
389 uicontrol( ... %% [frame]
390 'Units','pixels', ...
391 'Position',frame1_pos, ...
392 'Style','frame'),'units','normalized');
393
394 set( ...
395 uicontrol( ... %% title
396 'Units','pixels', ...
397 'Position',title_text_pos, ...
398 'HorizontalAlignment','left', ...
399 'Style','text', ...
400 'String','Title'),'units','normalized');
401
402 pr = udata.property{indx};
403 ed_h = uicontrol( ... %% [edit]
404 'Units','pixels', ...
405 'Position',title_pos, ...
406 'FontSize',12, ...
407 'Style','edit', ...
408 'String',pr{2}, ...
409 'BackgroundColor',bg_color2);
410 set(ed_h,'units','normalized');
411
412 set( ...
413 uicontrol( ... %% [frame]
414 'Units','pixels', ...
415 'Position',frame2_pos, ...
416 'Style','frame'),'units','normalized');
417
418 chkb_h = uicontrol( ... %% interpolated
419 'Units','pixels', ...
420 'Position',interp_pos, ...
421 'Style','checkbox', ...
422 'String','interpolated', ...
423 'Value',pr{1});
424 set(chkb_h,'units','normalized');
425
426 set( ...
427 uicontrol( ... %% [frame]
428 'Units','pixels', ...
429 'Position',frame3_pos, ...
430 'Style','frame'),'units','normalized');
431
432 popup1_h = uicontrol( ... %% [popup]
433 'Units','pixels', ...
434 'Max',2, ...
435 'Min',1, ...
436 'Position',popup_pos, ...
437 'String',pr{3}, ...
438 'Style','popupmenu', ...
439 'Value',pr{4});
440 s = ['tmp=get(' mat2str(fig_h) ',''userdata'');' ...
441 'vis_show_gui_tool([tmp(3) 6],''popup_select'');' ...
442 'u=get(' mat2str(h) ',''UserData'');' ...
443 'v=' mat2str(indx) ';' ...
444 'pr=u.property{v};' ...
445 'pr{3}=get(tmp(3),''string'');' ...
446 'pr{4}=get(tmp(3),''value'');' ...
447 'u.property{v}=pr;' ...
448 'set(' mat2str(h) ',''userdata'',u)'];
449 set(popup1_h,'units','normalized', ...
450 'Callback',s);
451
452 set( ...
453 uicontrol( ... %% [frame]
454 'Units','pixels', ...
455 'Position',frame4_pos, ...
456 'Style','frame'),'units','normalized');
457
458 s = ['vis_show_gui_comp(', ...
459 mat2str(h), ',', mat2str(indx), ...
460 ',''color'',' mat2str(fig_h) ')'];
461 set( ...
462 uicontrol( ... %% OK
463 'Units','pixels', ...
464 'Position',ok_pos, ...
465 'String','OK', ...
466 'Callback',s),'units','normalized');
467
468 set( ...
469 uicontrol( ... %% Cancel
470 'Units','pixels', ...
471 'Position',cancel_pos, ...
472 'String','Cancel', ...
473 'Callback',['close(' mat2str(fig_h) ')']),'units','normalized');
474
475 watchoff(old_fig_n);
476 tmp_udata = [chkb_h ed_h popup1_h];
477 set(fig_h,'units','normalized', ...
478 'Visible','on', ...
479 'UserData', tmp_udata, ...
480 'handlevisibility','off');
481
482 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
483 % 'empty'
484 %
485 elseif (strncmp('empty',plot_array(indx).args{1},5))
486 old_fig_n = watchon;
487 W = 230; H = 121.483;
488 units = get(h,'units');
489 set(h,'units','pixels');
490 fp = get(h,'Position');
491 fig_pos = [(fp(1)+fp(3)) ...
492 (fp(2)+fp(2)+fp(4)/2-H/2) ...
493 W ...
494 H];
495 o1 = sum(f_fr([2 4]))+frames_dist;
496 o2 = 2*dist1+max(title_edit_h,title_txt(2));
497 o3 = 2*dist1+interp_cb(2);
498 o4 = W-(title_txt(1)+2*ok_pb(1));
499 o5 = o1+dist1+(title_edit_h-title_txt(2))/2;
500 o6 = o1+dist1;
501 if title_txt(2)>title_edit_h,
502 o5 = o1+dist1;
503 o6 = o5+(title_edit_h-title_txt(2))/2;
504 end
505 o7 = ok_pb(1)+title_txt(1);
506 o8 = o1+o2+hint_dist1;
507 hint_text_pos = [1 o8 hint_txt];
508 frame1_pos = [f_fr(1) o1 f_fr(3) o3];
509 title_text_pos = [ok_pb(1) o5 title_txt];
510 title_pos = [o7 o6 o4 title_edit_h];
511 frame2_pos = f_fr;
512 ok_pos = ok_pb;
513 cancel_pos = cancel_pb;
514
515 fig_h = figure( ...
516 'Units','pixels', ...
517 'Position', fig_pos, ...
518 'Color',fig_color, ...
519 'NumberTitle','off', ...
520 'Name','empty plane', ...
521 'MenuBar','none', ...
522 'Visible','off');
523
524 set( ...
525 uicontrol( ... %% hint
526 'Units','pixels', ...
527 'BackgroundColor',fig_color, ...
528 'HorizontalAlignment','center', ...
529 'Position',hint_text_pos, ...
530 'String','Options for empty plane', ...
531 'Style','text'),'units','normalized');
532
533 set( ...
534 uicontrol( ... %% [frame]
535 'Units','pixels', ...
536 'Position',frame1_pos, ...
537 'Style','frame'),'units','normalized');
538
539 set( ...
540 uicontrol( ... %% title
541 'Units','pixels', ...
542 'Position',title_text_pos, ...
543 'HorizontalAlignment','left', ...
544 'Style','text', ...
545 'String','Title'),'units','normalized');
546
547 pr = udata.property{indx};
548 ed_h = uicontrol( ... %% [edit]
549 'Units','pixels', ...
550 'Position',title_pos, ...
551 'Style','edit', ...
552 'FontSize',12, ...
553 'String',pr{1}, ...
554 'BackgroundColor',bg_color2);
555 set(ed_h,'units','normalized');
556
557 set( ...
558 uicontrol( ... %% [frame]
559 'Units','pixels', ...
560 'Position',frame2_pos, ...
561 'Style','frame'),'units','normalized');
562
563 s = ['vis_show_gui_comp(', ...
564 mat2str(h) ',' mat2str(indx), ...
565 ',''empty'',' mat2str(fig_h) ')'];
566 set( ...
567 uicontrol( ... %% OK
568 'Units','pixels', ...
569 'Position',ok_pos, ...
570 'String','OK', ...
571 'Callback',s),'units','normalized');
572
573 set( ...
574 uicontrol( ... %% Cancel
575 'Units','pixels', ...
576 'Position',cancel_pos, ...
577 'String','Cancel', ...
578 'Callback',['close(' mat2str(fig_h) ')']),'units','normalized');
579
580 watchoff(old_fig_n);
581 tmp_udata = [ed_h];
582 set(fig_h,'units','normalized', ...
583 'Visible','on', ...
584 'UserData', tmp_udata, ...
585 'handlevisibility','off');
586
587 end
588
589 %%%%%%
590 % comp %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
591 %%%%%%
592 elseif (strcmp(action,'comp'))
593 tmp_h = get(varargin{1},'UserData');
594 v = get(tmp_h,'Value');
595 pr = udata.property{indx};
596 if (v)
597 v = 'compi';
598 pr{1} = 1;
599 else
600 v = 'comp';
601 pr{1} = 0;
602 end
603 plot_array(indx).args{1} = v;
604 udata.plot_array = plot_array;
605 udata.property{indx} = pr;
606 set(h,'UserData',udata);
607 close(varargin{1});
608
609 %%%%%%
610 % umat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
611 %%%%%%
612 elseif (strcmp(action,'umat'))
613 tmp_h = get(varargin{1},'UserData');
614 v = get(tmp_h(1),'Value');
615 pr = udata.property{indx};
616 if (v)
617 v = 'umati';
618 pr{1} = 1;
619 else
620 v = 'umat';
621 pr{1} = 0;
622 end
623 plot_array(indx).args{1} = v;
624
625 s = get(tmp_h(2),'String');
626 v = get(tmp_h(3),'Value'); % userdata
627 plot_array(indx).string = s;
628 if strcmp(s,'U-matrix')
629 plot_array(indx).args{2} = v;
630 else
631 plot_array(indx).args{2} = {v s};
632 end
633 pr{2} = s;
634 pr{3} = v;
635 udata.plot_array = plot_array;
636 udata.property{indx} = pr;
637 set(h,'UserData',udata);
638 set(udata.h(1),'String',{plot_array(:).string});
639 close(varargin{1});
640
641 %%%%%%%
642 % color %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
643 %%%%%%%
644 elseif (strcmp(action,'color'))
645 tmp_h = get(varargin{1},'UserData'); % tmp_h = [chkb_h ed_h popup1_h];
646
647 v = get(tmp_h(1),'Value');
648 pr = udata.property{indx};
649 if (v)
650 v = 'colori';
651 pr{1} = 1;
652 else
653 v = 'color';
654 pr{1} = 0;
655 end
656 plot_array(indx).args{1} = v;
657
658 v = get(tmp_h(3),'Value');
659 s = get(tmp_h(3),'string');
660 if v>5 & ~strcmp(s{v},'-variable-'),
661 m = evalin('base',s{v});
662 elseif ~strcmp(s{v},'-variable-'),
663 m = som_colorcode(udata.sM,s{v});
664 end
665 plot_array(indx).args{2} = m;
666 pr{3} = s;
667 s = get(tmp_h(2),'String');
668 plot_array(indx).string = s;
669 if ~strcmp(s,'Color code')
670 plot_array(indx).args{2} = ...
671 {plot_array(indx).args{2} s};
672 end
673 pr{2} = s;
674 pr{4} = v;
675 udata.plot_array = plot_array;
676 udata.property{indx} = pr;
677 set(h,'UserData',udata);
678 set(udata.h(1),'String',{plot_array(:).string});
679 close(varargin{1});
680
681 %%%%%%%
682 % empty %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
683 %%%%%%%
684 elseif (strcmp(action,'empty'))
685 pr = udata.property{indx};
686 tmp_h = get(varargin{1},'UserData');
687 s = get(tmp_h,'String');
688 pr{1} = s;
689 plot_array(indx).string = s;
690 plot_array(indx).args{2} = s;
691 udata.plot_array = plot_array;
692 udata.property{indx} = pr;
693 set(h,'UserData',udata);
694 set(udata.h(1),'String',{plot_array(:).string});
695 close(varargin{1});
696
697 else
698
699 end
700
701
702