Changeset 131
- Timestamp:
- Nov 25, 2010, 9:42:34 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plot_field.m
r128 r131 139 139 end 140 140 end 141 141 if isfield(PlotParam,'text_display_1') && ishandle(PlotParam.text_display_1) 142 PlotParam=read_plot_param(PlotParam); 143 end 142 144 if testnewfig% create a new figure and axes if the plotting axes does not exist 143 145 hfig=figure; … … 158 160 haxes=axes; 159 161 set(haxes,'position',[0.13,0.2,0.775,0.73]) 160 end 161 if isfield(PlotParam,'text_display_1') && ishandle(PlotParam.text_display_1) 162 PlotParam=read_plot_param(PlotParam);163 end 164 if testnewfig 165 PlotParam.NextPlot='add'; %parameter for plot_profile and plot_hist 166 end 162 PlotParam.NextPlot='add'; %parameter for plot_profile and plot_his 163 else 164 hfig=get(haxes,'parent'); 165 set(0,'CurrentFigure',hfig) 166 set(hfig,'CurrentAxes',haxes) 167 end 168 167 169 if isfield(PlotParam,'Auto_xy') && isequal(PlotParam.Auto_xy,1) 168 170 set(haxes,'DataAspectRatioMode','auto')%automatic aspect ratio … … 428 430 if test_newplot && ~isequal(plotstr,'hhh=plot(') 429 431 plotstr=[plotstr '''tag'',''plot_line'');']; 430 %execute plot (instruction plotstr) 431 axes(haxes)% select the plotting axes for plot operation 432 %execute plot (instruction plotstr) 433 % set(hfig,'CurrentAxes',haxes) 434 % axes(haxes)% select the plotting axes for plot operation 432 435 eval(plotstr) 433 436 … … 758 761 x_cont=AX(1):sizpx:AX(end); % pixel x coordinates for image display 759 762 y_cont=AY(1):-sizpy:AY(end); % pixel x coordinates for image display 763 % axes(haxes)% set the input axes handle as current axis 760 764 txt=ver;%version of Matlab 761 765 Release=txt(1).Release; … … 828 832 if isempty(hima) 829 833 % axes(haxes)% set haxes the current axes for image creation 830 set(hfig,'CurrentAxes',haxes) % set haxes the current axes for image creation834 % set(hfig,'CurrentAxes',haxes) % set haxes the current axes for image creation 831 835 tag=get(haxes,'Tag'); 832 836 if MinA<MaxA … … 841 845 set(hima,'CData',B); 842 846 if MinA<MaxA 843 caxis([MinA MaxA]) 847 set(haxes,'CLim',[MinA MaxA]) 848 %caxis([MinA MaxA]) 844 849 else 845 caxis([MaxA-1 MaxA]) 850 set(haxes,'CLim',[MinA MaxA]) 851 %caxis([MaxA-1 MaxA]) 846 852 end 847 853 set(hima,'XData',AX); … … 1169 1175 if 2*icolor > sizh(1) %if icolor exceeds the number of existing ones 1170 1176 %axes(haxes) 1171 hfig=get(haxes,'parent');1177 % hfig=get(haxes,'parent'); 1172 1178 % axes(haxes) 1173 set(0,'CurrentFigure',hfig)1174 set(hfig,'CurrentAxes',haxes)1179 % set(0,'CurrentFigure',hfig) 1180 % set(hfig,'CurrentAxes',haxes) 1175 1181 if ~isn(1) %if the vectors are visible color not nan 1176 1182 if n(2)>0
Note: See TracChangeset
for help on using the changeset viewer.