Changeset 748 for trunk/src/get_field.m


Ignore:
Timestamp:
Apr 23, 2014, 4:57:58 PM (10 years ago)
Author:
sommeria
Message:

update for 3D plots, panel Coordiantes introduces, while coordiantes now called Axes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/get_field.m

    r747 r748  
    159159set(handles.vector_x,'String',Field.Display.ListVarName)% fill the menu of x vector components
    160160set(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 components
     161set(handles.vector_z,'String',[{''} Field.Display.ListVarName])% fill the menu of y vector components
    162162set(handles.vec_color,'String',[{''} Field.Display.ListVarName])% fill the menu of y vector components
    163163set(handles.scalar,'Value',1)% fill the menu of y vector components
     
    165165set(handles.ordinate,'Value',1)% fill the menu of y vector components
    166166set(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')
     167checkseries=0;
     168if 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)
     173elseif isfield(Field,'Conventions')&& strcmp(Field.Conventions,'uvmat/civdata')
    168174    set(handles.FieldOption,'String',{'1D plot';'scalar';'vectors';'civdata...'})% provides the possibility to come back to civdata
     175    set(handles.scalar,'Max',1)
    169176else
    170177    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)
     179end
     180if Field.MaxDim>=2 && ~checkseries% case of 2D (or 3D) fields
    173181    check_vec_input=0;
    174182    if isfield(ParamIn,'vector_x')&& isfield(ParamIn,'vector_y')
     
    204212    set(handles.dimensions,'String',Tabchar)
    205213end
    206 set(handles.variables,'Value',1)
    207 set(handles.variables,'String',[{'*'} Field.ListVarName])
    208 variables_Callback(handles.variables,[], handles)% list the global attributes
    209214
    210215%% fill menus for coordinates and time
     
    246251end
    247252Check3D_Callback(hObject, eventdata, handles)
     253set(handles.variables,'Value',1)
     254set(handles.variables,'String',[{'*'} Field.ListVarName])
     255variables_Callback(handles.variables,[], handles)% list the global attributes
    248256drawnow
    249257uiwait(handles.get_field);
     
    311319else
    312320    list_var=get(handles.variables,'String');
     321    if index>numel(list_var)
     322        return
     323    end
    313324    var_select=list_var{index};
    314325    set(handles.attributes_txt,'String', ['attributes of ' var_select])
     
    329340        end
    330341    end
    331    
    332342end
    333343if ~isempty(Tabcell)
Note: See TracChangeset for help on using the changeset viewer.