Changeset 231 for trunk/src/plot_object.m
- Timestamp:
- Apr 5, 2011, 12:46:34 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plot_object.m
r187 r231 70 70 test_newobj=0; 71 71 haxes=get(hplot,'parent'); 72 currentfig=get(haxes,'parent'); 72 73 elseif isequal(get(hplot,'Type'),'axes')% hplot is the handle of an axis 74 haxes=hplot; 73 75 currentfig=get(hplot,'parent'); 74 set(0,'CurrentFigure',currentfig)75 haxes=hplot;76 set(currentfig,'CurrentAxes',haxes);76 % set(0,'CurrentFigure',currentfig) 77 78 % set(currentfig,'CurrentAxes',haxes); 77 79 elseif isequal(get(hplot,'Type'),'figure')% hplot is the handle of a figure 78 80 set(0,'CurrentFigure',hplot);%set the input figure as the current one 79 81 haxes=findobj(hplot,'Type','axes');%look for axes in the figure 80 82 haxes=haxes(1); 81 set(hplot,'CurrentAxes',haxes);%set the first found axis as the current one 83 currentfig=hplot; 84 % set(hplot,'CurrentAxes',haxes);%set the first found axis as the current one 82 85 else 83 figure; %create new figure86 currentfig=figure; %create new figure 84 87 hplot=axes;%create new axes 85 88 haxes=hplot; 86 89 end 87 90 else 88 figure; %create new figure91 currentfig=figure; %create new figure 89 92 hplot=axes;%create new axes 90 93 haxes=hplot; 91 94 end 95 set(0,'CurrentFigure',currentfig)%set the currentfigure as the current one 96 set(currentfig,'CurrentAxes',haxes);%set the current axes in the current figure 92 97 93 98 %% default input parameters … … 333 338 %% create the object 334 339 if test_newobj 335 axes(haxes)340 % axes(haxes) 336 341 hother=findobj('Tag','proj_object');%find all the proj objects 337 342 for iobj=1:length(hother)
Note: See TracChangeset
for help on using the changeset viewer.