Changeset 748 for trunk/src/get_field.m
- Timestamp:
- Apr 23, 2014, 4:57:58 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/get_field.m
r747 r748 159 159 set(handles.vector_x,'String',Field.Display.ListVarName)% fill the menu of x vector components 160 160 set(handles.vector_y,'String',Field.Display.ListVarName)% fill the menu of y vector components 161 set(handles.vector_z,'String', Field.Display.ListVarName)% fill the menu of y vector components161 set(handles.vector_z,'String',[{''} Field.Display.ListVarName])% fill the menu of y vector components 162 162 set(handles.vec_color,'String',[{''} Field.Display.ListVarName])% fill the menu of y vector components 163 163 set(handles.scalar,'Value',1)% fill the menu of y vector components … … 165 165 set(handles.ordinate,'Value',1)% fill the menu of y vector components 166 166 set(handles.ordinate,'String',Field.Display.ListVarName)% fill the menu of y coordinate for 1D plots 167 if isfield(Field,'Conventions')&& strcmp(Field.Conventions,'uvmat/civdata') 167 checkseries=0; 168 if isfield(ParamIn,'SeriesInput') && ParamIn.SeriesInput 169 set(handles.FieldOption,'value',1) 170 set(handles.FieldOption,'String',{'scalar'})% case of call by series, only scalar 171 checkseries=1; 172 set(handles.scalar,'Max',2) 173 elseif isfield(Field,'Conventions')&& strcmp(Field.Conventions,'uvmat/civdata') 168 174 set(handles.FieldOption,'String',{'1D plot';'scalar';'vectors';'civdata...'})% provides the possibility to come back to civdata 175 set(handles.scalar,'Max',1) 169 176 else 170 177 set(handles.FieldOption,'String',{'1D plot';'scalar';'vectors'}) 171 end 172 if Field.MaxDim>=2 % case of 2D (or 3D) fields 178 set(handles.scalar,'Max',1) 179 end 180 if Field.MaxDim>=2 && ~checkseries% case of 2D (or 3D) fields 173 181 check_vec_input=0; 174 182 if isfield(ParamIn,'vector_x')&& isfield(ParamIn,'vector_y') … … 204 212 set(handles.dimensions,'String',Tabchar) 205 213 end 206 set(handles.variables,'Value',1)207 set(handles.variables,'String',[{'*'} Field.ListVarName])208 variables_Callback(handles.variables,[], handles)% list the global attributes209 214 210 215 %% fill menus for coordinates and time … … 246 251 end 247 252 Check3D_Callback(hObject, eventdata, handles) 253 set(handles.variables,'Value',1) 254 set(handles.variables,'String',[{'*'} Field.ListVarName]) 255 variables_Callback(handles.variables,[], handles)% list the global attributes 248 256 drawnow 249 257 uiwait(handles.get_field); … … 311 319 else 312 320 list_var=get(handles.variables,'String'); 321 if index>numel(list_var) 322 return 323 end 313 324 var_select=list_var{index}; 314 325 set(handles.attributes_txt,'String', ['attributes of ' var_select]) … … 329 340 end 330 341 end 331 332 342 end 333 343 if ~isempty(Tabcell)
Note: See TracChangeset
for help on using the changeset viewer.