Changeset 221 for trunk/src/plot_field.m
- Timestamp:
- Mar 12, 2011, 11:11:01 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plot_field.m
r210 r221 240 240 msgbox_uvmat('ERROR', errormsg) 241 241 end 242 if isfield(PlotParamOut,'MinX') 243 set(haxes,'XLim',[PlotParamOut.MinX PlotParamOut.MaxX]) 244 set(haxes,'YLim',[PlotParamOut.MinY PlotParamOut.MaxY]) 245 AxeData.RangeX=[PlotParamOut.MinX PlotParamOut.MaxX]; 246 AxeData.RangeY=[PlotParamOut.MinY PlotParamOut.MaxY]; 242 if isfield(PlotParamOut,'RangeX')&& isfield(PlotParamOut,'RangeY') 243 % 'TESTplot' 244 % haxes 245 % PlotParamOut.MinX 246 % PlotParamOut.MaxY 247 % set(haxes,'XLim',[PlotParamOut.MinX PlotParamOut.MaxX]) 248 % set(haxes,'YLim',[PlotParamOut.MinY PlotParamOut.MaxY]) 249 AxeData.RangeX=PlotParamOut.RangeX;%'[PlotParamOut.MinX PlotParamOut.MaxX]; 250 AxeData.RangeY=PlotParamOut.RangeY;%[PlotParamOut.MinY PlotParamOut.MaxY] 247 251 end 248 252 … … 508 512 509 513 %% determine axes bounds 510 fix_lim=isfield(PlotParam,'FixLimits') && PlotParam.FixLimits; 514 PlotParamOut.RangeX=[min(XMin) max(XMax)]; 515 PlotParamOut.RangeY=[min(YMin_cell) max(YMax_cell)]; 516 fix_lim=isfield(PlotParam,'FixLimits') && PlotParam.FixLimits; 511 517 if fix_lim 512 518 if ~isfield(PlotParam,'MinX')||~isfield(PlotParam,'MaxX')||~isfield(PlotParam,'MinY')||~isfield(PlotParam,'MaxY') 513 519 fix_lim=0; %free limits if lits are not set, 514 end %else PlotParamOut.XMin =PlotParam.XMin...520 end 515 521 end 516 522 if ~fix_lim … … 1074 1080 end %else PlotParamOut.XMin =PlotParam.XMin... 1075 1081 end 1076 if ~fix_lim1082 % if ~fix_lim 1077 1083 XMin=[]; 1078 1084 XMax=[]; … … 1091 1097 YMax=[YMax max(vec_Y)]; 1092 1098 end 1099 PlotParamOut.RangeX=[min(XMin) max(XMax)]; %range of x, to be stored in the user data of the plot axes 1100 PlotParamOut.RangeY=[min(YMin) max(YMax)]; %range of x, to be stored in the user data of the plot axes 1101 if ~fix_lim 1093 1102 PlotParamOut.MinX=min(XMin); 1094 1103 PlotParamOut.MaxX=max(XMax); … … 1102 1111 end 1103 1112 end 1104 % if Ylim(2)>Ylim(1)1105 % set(haxes,'YLim',Ylim);% set y limits of frame in axes coordinate1106 % end1107 % end1108 % adjust the size of the plot to include the whole field, except if PlotParam.FixLimits=11109 % if ~(isfield(PlotParam,'FixLimits') && PlotParam.FixLimits) && test_lim1110 % PlotParamOut.MinX=Xlim(1);1111 % PlotParamOut.MaxX=Xlim(2);1112 % PlotParamOut.MinY=Ylim(1);1113 % PlotParamOut.MaxY=Ylim(2);1114 % if Xlim(2)>Xlim(1)1115 % set(haxes,'XLim',Xlim);% set x limits of frame in axes coordinates1116 % end1117 % if Ylim(2)>Ylim(1)1118 % set(haxes,'YLim',Ylim);% set y limits of frame in axes coordinate1119 % end1120 % end1121 1122 1113 set(haxes,'YDir','normal') 1123 1114 set(get(haxes,'XLabel'),'String',[XName ' (' x_units ')']);
Note: See TracChangeset
for help on using the changeset viewer.