- Timestamp:
- Feb 25, 2014, 11:28:14 PM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r714 r717 4584 4584 h=findobj(handles.PlotAxes,'tag','ima'); %look for image in the plot 4585 4585 if ~isempty(h) 4586 map=colormap(handles.PlotAxes);4587 colormap(map);%transmit the current colormap to the zoom fig4588 colorbar4586 map=colormap(handles.PlotAxes); 4587 colormap(map);%transmit the current colormap to the zoom fig 4588 colorbar 4589 4589 end 4590 4590 -
trunk/src/view_field.m
r690 r717 119 119 %% reset position of text_display and TableDisplay 120 120 % reset position of text_display 121 pos_1=get(handles.text_display,'Position');% [lower x lower y width height] for text_display 122 pos_1(1)=size_fig(3)-pos_1(3); % set text display to the right of the fig 123 pos_1(2)=size_fig(4)-pos_1(4); % set text display to the top of the fig 124 set(handles.text_display,'Position',pos_1) 125 % reset position of TableDisplay 126 % pos_1=get(handles.TableDisplay,'Position'); 127 % pos_1(1)=size_fig(3)-pos_1(3); 128 % pos_1(2)=size_fig(4)-pos_1(4); 129 set(handles.TableDisplay,'Position',pos_1) 130 % end 121 pos_1=get(handles.text_display,'Position');% [lower x lower y width height] for text_display 122 pos_1(1)=size_fig(3)-pos_1(3); % set text display to the right of the fig 123 pos_1(2)=size_fig(4)-pos_1(4); % set text display to the top of the fig 124 set(handles.text_display,'Position',pos_1) 125 % reset position of TableDisplay 126 set(handles.TableDisplay,'Position',pos_1) 131 127 % reset position of CheckTable 132 128 pos_CheckTable=get(handles.CheckTable,'Position');% [lower x lower y width height] for CheckHold … … 168 164 169 165 %% reset position and scale of axis 166 set(handles.PlotAxes,'Units','pixels') 170 167 bord=[50 40 30 60]; %bordure left,inf, right,sup 171 168 pos(1)=bord(1); … … 174 171 pos(4)=max(1,size_fig(4)-bord(4)); 175 172 set(handles.PlotAxes,'Position',pos) 173 set(handles.PlotAxes,'Units','normalized') 176 174 177 175 %------------------------------------------------------------------------ … … 317 315 function MenuExportFigure_Callback(hObject, eventdata, handles) 318 316 %------------------------------------------------------------------- 319 huvmat=get(handles.MenuExport,'parent');320 UvData=get(huvmat,'UserData');321 317 hfig=figure; 322 newaxes=copyobj(handles.PlotAxes,hfig); 323 map=colormap(handles.PlotAxes); 324 colormap(map);%transmit the current colormap to the zoom fig 325 colorbar 318 copyobj(handles.PlotAxes,hfig); 319 if ~isempty(h) 320 h=findobj(handles.PlotAxes,'tag','ima'); %look for image in the plot 321 map=colormap(handles.PlotAxes); 322 colormap(map);%transmit the current colormap to the zoom fig 323 colorbar 324 end 325 326 % -------------------------------------------------------------------- 327 function MenuExportAxis_Callback(hObject, eventdata, handles) 328 ListFig=findobj(allchild(0),'Type','figure'); 329 nb_option=0; 330 menu={}; 331 for ilist=1:numel(ListFig) 332 FigName=get(ListFig(ilist),'name'); 333 if isempty(FigName) 334 FigName=['figure ' num2str(ListFig(ilist))]; 335 end 336 if ~strcmp(FigName,'uvmat') 337 ListAxes=findobj(ListFig(ilist),'Type','axes'); 338 ListTags=get(ListAxes,'Tag'); 339 if ~isempty(ListTags) && ~isempty(find(~strcmp('Colorbar',ListTags), 1)) 340 ListAxes=ListAxes(~strcmp('Colorbar',ListTags)); 341 if numel(ListAxes)==1 342 nb_option=nb_option+1; 343 menu{nb_option}=FigName ; 344 AxesHandle(nb_option)=ListAxes; 345 else 346 nb_axis=0; 347 for iaxes=1:numel(ListAxes) 348 nb_axis=nb_axis+1; 349 nb_option=nb_option+1; 350 menu{nb_option}=[FigName '_' num2str(nb_axis)]; 351 AxesHandle(nb_option)=ListAxes(nb_axis); 352 end 353 end 354 end 355 end 356 end 357 if isempty(menu) 358 answer=msgbox_uvmat('INPUT_Y-N','no existing plotting axes available, create new figure?'); 359 if strcmp(answer,'Yes') 360 hfig=figure; 361 copyobj(handles.PlotAxes,hfig); 362 else 363 return 364 end 365 map=colormap(handles.PlotAxes); 366 colormap(map);%transmit the current colormap to the zoom fig 367 colorbar 368 else 369 answer=msgbox_uvmat('INPUT_MENU','select a figure/axis on which the current uvmat plot will be exported',menu); 370 if isempty(answer) 371 return 372 else 373 axes(AxesHandle(answer)) 374 hold on 375 hchild=get(handles.PlotAxes,'children'); 376 copyobj(hchild,gca); 377 end 378 end 326 379 327 380 %-------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.