Changeset 193 for trunk/src/view_field.m


Ignore:
Timestamp:
Feb 20, 2011, 10:42:19 AM (13 years ago)
Author:
sommeria
Message:

improves the use of get_field, no projection object by default in uvmat( allows usual 1D plots),

various bug repairs, elimination of get_plot_handles.m (not useful)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/view_field.m

    r192 r193  
    266266
    267267%-------------------------------------------------------------------
    268 % --- Executes on button press in 'FixedLimits'.
    269 %-------------------------------------------------------------------
    270 function FixedLimits_Callback(hObject, eventdata, handles)
    271 test=get(handles.FixedLimits,'Value');
     268% --- Executes on button press in 'FixLimits'.
     269%-------------------------------------------------------------------
     270function FixLimits_Callback(hObject, eventdata, handles)
     271test=get(handles.FixLimits,'Value');
    272272if test
    273     set(handles.FixedLimits,'BackgroundColor',[1 1 0])
     273    set(handles.FixLimits,'BackgroundColor',[1 1 0])
    274274else
    275     set(handles.FixedLimits,'BackgroundColor',[0.7 0.7 0.7])
    276 end
    277 
    278 %-------------------------------------------------------------------
    279 % --- Executes on button press in auto_xy.
    280 function auto_xy_Callback(hObject, eventdata, handles)
    281 test=get(handles.auto_xy,'Value');
     275    set(handles.FixLimits,'BackgroundColor',[0.7 0.7 0.7])
     276end
     277
     278%-------------------------------------------------------------------
     279% --- Executes on button press in FixEqual.
     280function FixEqual_Callback(hObject, eventdata, handles)
     281test=get(handles.FixEqual,'Value');
    282282if test
    283     set(handles.auto_xy,'BackgroundColor',[1 1 0])
     283    set(handles.FixEqual,'BackgroundColor',[1 1 0])
    284284    cla(handles.axes3)
    285285    update_plot(handles)
    286286else
    287     set(handles.auto_xy,'BackgroundColor',[0.7 0.7 0.7])
     287    set(handles.FixEqual,'BackgroundColor',[0.7 0.7 0.7])
    288288    update_plot(handles)
    289289end
     
    298298if (get(handles.zoom,'Value') == 1);
    299299    set(handles.zoom,'BackgroundColor',[1 1 0])
    300     set(handles.FixedLimits,'Value',1)% propose by default fixed limits for the plotting axes
    301     set(handles.FixedLimits,'BackgroundColor',[1 1 0])
     300    set(handles.FixLimits,'Value',1)% propose by default fixed limits for the plotting axes
     301    set(handles.FixLimits,'BackgroundColor',[1 1 0])
    302302else
    303303    set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7])
     
    532532function MinA_Callback(hObject, eventdata, handles)
    533533%------------------------------------------
    534 set(handles.AutoScal,'Value',1) %suppress auto mode
    535 set(handles.AutoScal,'BackgroundColor',[1 1 0])
     534set(handles.FixScal,'Value',1) %suppress auto mode
     535set(handles.FixScal,'BackgroundColor',[1 1 0])
    536536update_plot(handles)
    537537
     
    539539function MaxA_Callback(hObject, eventdata, handles)
    540540%--------------------------------------------
    541 set(handles.AutoScal,'Value',1) %suppress auto mode
    542 set(handles.AutoScal,'BackgroundColor',[1 1 0])
     541set(handles.FixScal,'Value',1) %suppress auto mode
     542set(handles.FixScal,'BackgroundColor',[1 1 0])
    543543update_plot(handles)
    544544
    545545%-----------------------------------------------
    546 function AutoScal_Callback(hObject, eventdata, handles)
     546function FixScal_Callback(hObject, eventdata, handles)
    547547%--------------------------------------------
    548 test=get(handles.AutoScal,'Value');
     548test=get(handles.FixScal,'Value');
    549549if test
    550     set(handles.AutoScal,'BackgroundColor',[1 1 0])
     550    set(handles.FixScal,'BackgroundColor',[1 1 0])
    551551else
    552     set(handles.AutoScal,'BackgroundColor',[0.7 0.7 0.7])
     552    set(handles.FixScal,'BackgroundColor',[0.7 0.7 0.7])
    553553    update_plot(handles);
    554554%     set(handles.MinA,'String',num2str(ScalOut.MinA,3))
     
    592592function VecScale_Callback(hObject, eventdata, handles)
    593593%-------------------------------------------------------------------
    594 set(handles.AutoVec,'Value',1);
    595 set(handles.AutoVec,'BackgroundColor',[1 1 0])
    596 update_plot(handles)
    597 
    598 %-------------------------------------------------------------------
    599 function AutoVec_Callback(hObject, eventdata, handles)
    600 %-------------------------------------------------------------------
    601 test=get(handles.AutoVec,'Value');
     594set(handles.FixVec,'Value',1);
     595set(handles.FixVec,'BackgroundColor',[1 1 0])
     596update_plot(handles)
     597
     598%-------------------------------------------------------------------
     599function FixVec_Callback(hObject, eventdata, handles)
     600%-------------------------------------------------------------------
     601test=get(handles.FixVec,'Value');
    602602if test
    603     set(handles.AutoVec,'BackgroundColor',[1 1 0])
     603    set(handles.FixVec,'BackgroundColor',[1 1 0])
    604604else
    605605    update_plot(handles);
    606606    %set(handles.VecScale,'String',num2str(ScalOut.VecScale,3))
    607     set(handles.AutoVec,'BackgroundColor',[0.7 0.7 0.7])
     607    set(handles.FixVec,'BackgroundColor',[0.7 0.7 0.7])
    608608end
    609609
     
    819819
    820820
     821
     822
     823
     824function MinX_Callback(hObject, eventdata, handles)
     825% hObject    handle to MinX (see GCBO)
     826% eventdata  reserved - to be defined in a future version of MATLAB
     827% handles    structure with handles and user data (see GUIDATA)
     828
     829% Hints: get(hObject,'String') returns contents of MinX as text
     830%        str2double(get(hObject,'String')) returns contents of MinX as a double
     831
     832
     833% --- Executes during object creation, after setting all properties.
     834function MinX_CreateFcn(hObject, eventdata, handles)
     835% hObject    handle to MinX (see GCBO)
     836% eventdata  reserved - to be defined in a future version of MATLAB
     837% handles    empty - handles not created until after all CreateFcns called
     838
     839% Hint: edit controls usually have a white background on Windows.
     840%       See ISPC and COMPUTER.
     841if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
     842    set(hObject,'BackgroundColor','white');
     843end
     844
     845
     846
     847function MaxX_Callback(hObject, eventdata, handles)
     848% hObject    handle to MaxX (see GCBO)
     849% eventdata  reserved - to be defined in a future version of MATLAB
     850% handles    structure with handles and user data (see GUIDATA)
     851
     852% Hints: get(hObject,'String') returns contents of MaxX as text
     853%        str2double(get(hObject,'String')) returns contents of MaxX as a double
     854
     855
     856% --- Executes during object creation, after setting all properties.
     857function MaxX_CreateFcn(hObject, eventdata, handles)
     858% hObject    handle to MaxX (see GCBO)
     859% eventdata  reserved - to be defined in a future version of MATLAB
     860% handles    empty - handles not created until after all CreateFcns called
     861
     862% Hint: edit controls usually have a white background on Windows.
     863%       See ISPC and COMPUTER.
     864if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
     865    set(hObject,'BackgroundColor','white');
     866end
     867
     868
     869
     870function MinY_Callback(hObject, eventdata, handles)
     871% hObject    handle to MinY (see GCBO)
     872% eventdata  reserved - to be defined in a future version of MATLAB
     873% handles    structure with handles and user data (see GUIDATA)
     874
     875% Hints: get(hObject,'String') returns contents of MinY as text
     876%        str2double(get(hObject,'String')) returns contents of MinY as a double
     877
     878
     879% --- Executes during object creation, after setting all properties.
     880function MinY_CreateFcn(hObject, eventdata, handles)
     881% hObject    handle to MinY (see GCBO)
     882% eventdata  reserved - to be defined in a future version of MATLAB
     883% handles    empty - handles not created until after all CreateFcns called
     884
     885% Hint: edit controls usually have a white background on Windows.
     886%       See ISPC and COMPUTER.
     887if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
     888    set(hObject,'BackgroundColor','white');
     889end
     890
     891
     892
     893function MaxY_Callback(hObject, eventdata, handles)
     894% hObject    handle to MaxY (see GCBO)
     895% eventdata  reserved - to be defined in a future version of MATLAB
     896% handles    structure with handles and user data (see GUIDATA)
     897
     898% Hints: get(hObject,'String') returns contents of MaxY as text
     899%        str2double(get(hObject,'String')) returns contents of MaxY as a double
     900
     901
     902% --- Executes during object creation, after setting all properties.
     903function MaxY_CreateFcn(hObject, eventdata, handles)
     904% hObject    handle to MaxY (see GCBO)
     905% eventdata  reserved - to be defined in a future version of MATLAB
     906% handles    empty - handles not created until after all CreateFcns called
     907
     908% Hint: edit controls usually have a white background on Windows.
     909%       See ISPC and COMPUTER.
     910if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
     911    set(hObject,'BackgroundColor','white');
     912end
     913
     914
Note: See TracChangeset for help on using the changeset viewer.