Changeset 220 for trunk/src/view_field.m
- Timestamp:
- Mar 11, 2011, 12:03:39 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/view_field.m
r198 r220 492 492 set_vec_col_bar(handles) 493 493 494 % %--------------------------------------------495 % %update the display of color code for vectors496 % %--------------------------------------------497 % function set_vec_col_bar(handles)498 % %get the image of the color display button 'vec_col_bar' in pixels499 % uni=get(handles.vec_col_bar,'Unit');500 % set(handles.vec_col_bar,'Unit','pixel')501 % pos_vert=get(handles.vec_col_bar,'Position');502 % set(handles.vec_col_bar,'Unit','Normalized')503 % width=ceil(pos_vert(3));504 % height=ceil(pos_vert(4));505 % %get slider indications506 % colcode.min=get(handles.slider1,'Min');507 % colcode.max=get(handles.slider1,'Max');508 % colcode.colcode1=get(handles.slider1,'Value');509 % colcode.colcode2=get(handles.slider2,'Value');510 % colcode.option=get(handles.vec_col_bar,'Value');511 % colcode.auto=1;512 % list_code=get(handles.col_vec,'String');% list menu fields513 % index_code=get(handles.col_vec,'Value');% selected string index514 % colcode.CName= list_code{index_code(1)}; % selected field used for vector color515 % vec_C=colcode.min+(colcode.max-colcode.min)*[0.5:width-0.5]/width;%sample of vec_C values from min to max516 % [colorlist,col_vec]=set_col_vec(colcode,vec_C);517 % oneheight=ones(1,height);518 % A1=colorlist(col_vec,1)*oneheight;519 % A2=colorlist(col_vec,2)*oneheight;520 % A3=colorlist(col_vec,3)*oneheight;521 % A(:,:,1)=A1';522 % A(:,:,2)=A2';523 % A(:,:,3)=A3';524 % set(handles.vec_col_bar,'Cdata',A)525 526 527 494 %------------------------------------------------ 528 495 %CALLBACKS FOR PLOTTING PARAMETERS … … 707 674 colcode.colcode2=str2num(get(handles.colcode2,'String')); 708 675 end 709 % colcode.option=get(handles.vec_col_bar,'Value');710 676 colcode.FixedCbounds=0; 711 % list_code=get(handles.col_vec,'String');% list menu fields712 % index_code=get(handles.col_vec,'Value');% selected string index713 % colcode.CName= list_code{index_code(1)}; % selected field used for vector color714 677 colcode.FixedCbounds=1; 715 678 vec_C=colcode.MinC+(colcode.MaxC-colcode.MinC)*[0.5:width-0.5]/width;%sample of vec_C values from min to max … … 724 687 set(handles.vec_col_bar,'Cdata',A) 725 688 726 %------------------------------------------------------------------- 689 %------------------------------------------------------------------------ 727 690 function PlotType=update_plot(handles) 728 %------------------------------------------------------------------- 691 %------------------------------------------------------------------------ 729 692 haxes= handles.axes3; 730 693 … … 737 700 write_plot_param(handles,PlotParamOut); %update the auto plot parameters 738 701 739 %------------------------------------------------------ 702 %------------------------------------------------------------------------ 740 703 % --- Executes on button press in Menu/Export/field in workspace. 741 %------------------------------------------------------742 704 function MenuExportField_Callback(hObject, eventdata, handles) 743 705 %------------------------------------------------------------------------ 744 706 global Data_view_field 745 707 % huvmat=findobj(allchild(0),'Name','uvmat'); … … 752 714 commandwindow; 753 715 754 %------------------------------------------------------ 716 %------------------------------------------------------------------------ 755 717 % --- Executes on button press in Menu/Export/extract figure. 756 %------------------------------------------------------757 718 function MenuExport_plot_Callback(hObject, eventdata, handles) 719 %------------------------------------------------------------------------ 758 720 huvmat=get(handles.MenuExport_plot,'parent'); 759 721 UvData=get(huvmat,'UserData'); … … 764 726 colorbar 765 727 766 767 768 function npx_Callback(hObject, eventdata, handles) 769 770 function text_display_CreateFcn(hObject, eventdata, handles)%to suppress 771 function MinX_CreateFcn(hObject, eventdata, handles)%to suppress 772 function MaxX_CreateFcn(hObject, eventdata, handles)%to suppress 773 function MinY_CreateFcn(hObject, eventdata, handles)%to suppress 774 function MaxY_CreateFcn(hObject, eventdata, handles)%to suppress 775 function npy_Callback(hObject, eventdata, handles) 776 777 778 function edit86_Callback(hObject, eventdata, handles) 779 780 781 function edit87_Callback(hObject, eventdata, handles) 782 783 784 % --- Executes on button press in auto_sclar. 785 function auto_sclar_Callback(hObject, eventdata, handles) 786 % hObject handle to auto_sclar (see GCBO) 787 % eventdata reserved - to be defined in a future version of MATLAB 788 % handles structure with handles and user data (see GUIDATA) 789 790 % Hint: get(hObject,'Value') returns toggle state of auto_sclar 791 792 793 794 % --- Executes on slider movement. 795 function slider9_Callback(hObject, eventdata, handles) 796 797 798 799 % --- Executes on slider movement. 800 function slider10_Callback(hObject, eventdata, handles) 801 802 803 728 %------------------------------------------------------------------------ 804 729 function closefcn(hObject, eventdata, handles) 730 %------------------------------------------------------------------------ 805 731 huvmat=findobj(allchild(0),'Name','uvmat'); 806 732 if ~isempty(huvmat) … … 812 738 813 739 814 % --- Executes on selection change in popupmenu18. 815 function popupmenu18_Callback(hObject, eventdata, handles) 816 817 818 819 740 741 742
Note: See TracChangeset
for help on using the changeset viewer.