Changeset 1031
- Timestamp:
- Mar 5, 2018, 12:41:34 PM (7 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plot_field.m
r1027 r1031 194 194 195 195 %% 1D plot (usual graph y vs x) 196 if isempty(index_1D) 196 if isempty(index_1D)|| ~isempty(index_2D) 197 197 if ~isempty(haxes) 198 198 plot_profile([],[],haxes);%removes usual praphs y vs x in the absence of 1D field plot … … 653 653 654 654 % loop on the input field cells 655 for icell=1:numel(CellInfo) 655 for icell=1:numel(CellInfo) 656 656 if strcmp(CellInfo{icell}.CoordType,'tps') %do not plot directly tps data (used for projection only) 657 657 continue … … 688 688 if numel(CellInfo{icell}.VarIndex_vector_x)>1 689 689 errormsg='error in plot_field: attempt to plot two vector fields'; 690 return690 return 691 691 end 692 692 test_vec=1; … … 720 720 end 721 721 if ~isempty(ivar_F)%~(isfield(PlotParam.Vectors,'HideWarning')&& isequal(PlotParam.Vectors.HideWarning,1)) 722 % if test_vec 723 vec_F=Data.(Data.ListVarName{ivar_F}); % warning flags for dubious vectors 724 if ~(isfield(PlotParam.Vectors,'CheckHideWarning') && isequal(PlotParam.Vectors.CheckHideWarning,1)) 725 test_black=1; 726 end 727 % end 722 vec_F=Data.(Data.ListVarName{ivar_F}); % warning flags for dubious vectors 723 if ~(isfield(PlotParam.Vectors,'CheckHideWarning') && isequal(PlotParam.Vectors.CheckHideWarning,1)) 724 test_black=1; 725 end 728 726 end 729 727 if ~isempty(ivar_FF_vec) %&& ~test_false 730 % if test_vec% TODO: deal with FF for structured coordinates 731 vec_FF=Data.(Data.ListVarName{ivar_FF_vec}); % flags for false vectors 732 % end 728 vec_FF=Data.(Data.ListVarName{ivar_FF_vec}); % flags for false vectors 733 729 end 734 730 end … … 822 818 y_units=Data.CoordUnit; 823 819 end 824 end 825 end 820 end 821 end 822 826 823 PlotParamOut=PlotParam; % output plot parameters equal to input by default 827 824 … … 1265 1262 PlotParamOut.Axes.y_units=y_units; 1266 1263 end 1267 % if isfield(PlotParam,'Axes') && isfield(PlotParam.Axes,'CheckFixAspectRatio') && isequal(PlotParam.Axes.CheckFixAspectRatio,1)1268 % set(haxes,'DataAspectRatioMode','manual')1269 % if isfield(PlotParam.Axes,'AspectRatio')1270 % set(haxes,'DataAspectRatio',[PlotParam.Axes.AspectRatio 1 1])1271 % end1272 % else1273 % set(haxes,'DataAspectRatioMode','auto')1274 % end1275 1264 1276 1265 %------------------------------------------------------------------- -
trunk/src/series/turb_stat.m
r1027 r1031 63 63 ParamOut.AllowInputSort='off';% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default) 64 64 ParamOut.WholeIndexRange='off';% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default) 65 ParamOut.NbSlice= 'off'; %nbre of slices ('off' by default)65 ParamOut.NbSlice=1; %nbre of slices ('off' by default) 66 66 ParamOut.VelType='one';% menu for selecting the velocity type (options 'off'/'one'/'two', 'off' by default) 67 ParamOut.FieldName='o ne';% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)68 ParamOut.FieldTransform = 'o n';%can use a transform function67 ParamOut.FieldName='off';% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default) 68 ParamOut.FieldTransform = 'off';%can use a transform function 69 69 ParamOut.ProjObject='off';%can use projection object(option 'off'/'on', 70 70 ParamOut.Mask='off';%can use mask option (option 'off'/'on', 'off' by default) -
trunk/src/uigetfile_uvmat.m
r1030 r1031 191 191 end 192 192 end 193 set(hObject,'backgroundColor',[0 1 0])% indicate end button activatio n193 set(hObject,'backgroundColor',[0 1 0])% indicate end button activatio 194 194 fig_struct=get(hObject,'parent'); 195 if isstruct(fig_struct);%recent Matlab 195 196 uiresume(fig_struct.Number) 197 else 198 uiresume(fig_struct) 199 end 196 200 197 201 %------------------------------------------------------------------------ -
trunk/src/uvmat.m
r1029 r1031 1011 1011 data.Coord=[]; 1012 1012 otherwise 1013 data.RangeX=[UvData.Field.XMin UvData.Field.XMax]; 1013 1014 data.RangeY=[UvData.Field.YMin UvData.Field.YMax]; 1014 1015 end … … 3290 3291 set(handles.z_index,'String',num2str(z_index)) 3291 3292 end 3292 % inputfilerefresh menu for save_mask if relevant3293 % refresh menu for save_mask if relevant 3293 3294 masknumber=get(handles.masklevel,'String'); 3294 3295 if length(masknumber)>=z_index … … 5877 5878 5878 5879 5879 %TODO: use to modify fill_GUI 5880 %'write_plot_param': update the plotting parameters on the uvmat or view_field interface after a plotting operation 5881 function write_plot_param(handles,PlotParam) 5882 %% axes 5883 if isempty(PlotParam.Axes) 5884 set(handles.Axes,'Visible','off') 5885 set(handles.PlotAxes,'Visible','off') 5886 set(handles.text_display,'Visible','off') 5887 set(handles.TableDisplay,'Visible','on') 5888 else 5889 set(handles.Axes,'Visible','on') 5890 set(handles.PlotAxes,'Visible','on') 5891 set(handles.text_display,'Visible','on') 5892 % if isfield(handles,'TableDisplay') 5893 % set(handles.TableDisplay,'Visible','off') 5880 % %TODO: use to modify fill_GUI 5881 % %'write_plot_param': update the plotting parameters on the uvmat or view_field interface after a plotting operation 5882 % function write_plot_param(handles,PlotParam) 5883 % %% axes 5884 % if isempty(PlotParam.Axes) 5885 % set(handles.Axes,'Visible','off') 5886 % set(handles.PlotAxes,'Visible','off') 5887 % set(handles.text_display,'Visible','off') 5888 % set(handles.TableDisplay,'Visible','on') 5889 % else 5890 % set(handles.Axes,'Visible','on') 5891 % set(handles.PlotAxes,'Visible','on') 5892 % set(handles.text_display,'Visible','on') 5893 % % if isfield(handles,'TableDisplay') 5894 % % set(handles.TableDisplay,'Visible','off') 5895 % % end 5896 % Coordinates=PlotParam.Axes; 5897 % if isfield(Coordinates,'CheckFixAspectRatio') 5898 % if Coordinates.CheckFixAspectRatio 5899 % set(handles.CheckFixAspectRatio,'Value',1) 5900 % else 5901 % set(handles.CheckFixAspectRatio,'Value',0) 5902 % 5903 % end 5894 5904 % end 5895 Coordinates=PlotParam.Axes; 5896 if isfield(Coordinates,'CheckFixAspectRatio') 5897 if Coordinates.CheckFixAspectRatio 5898 set(handles.CheckFixAspectRatio,'Value',1) 5899 else 5900 set(handles.CheckFixAspectRatio,'Value',0) 5901 5902 end 5903 end 5904 if isfield(Coordinates,'AspectRatio') 5905 set(handles.num_AspectRatio,'String',num2str(Coordinates.AspectRatio)) 5906 end 5907 if isfield(Coordinates,'MinX') 5908 set(handles.num_MinX,'String',num2str(Coordinates.MinX,4)); 5909 set(handles.num_MaxX,'String',num2str(Coordinates.MaxX,4)); 5910 set(handles.num_MinY,'String',num2str(Coordinates.MinY,4)); 5911 set(handles.num_MaxY,'String',num2str(Coordinates.MaxY,4)); 5912 else 5913 set(handles.num_MinX,'String',''); 5914 set(handles.num_MaxX,'String',''); 5915 set(handles.num_MinY,'String',''); 5916 set(handles.num_MaxY,'String',''); 5917 end 5918 end 5919 5920 %% scalar or image parameters 5921 if isfield(PlotParam,'Scalar') 5922 set(handles.Scalar,'Visible','on') 5923 if isfield(PlotParam.Scalar,'MaxA') 5924 set(handles.num_MaxA,'String',num2str(PlotParam.Scalar.MaxA,3)); 5925 end 5926 if isfield(PlotParam.Scalar,'MinA') 5927 set(handles.num_MinA,'String',num2str(PlotParam.Scalar.MinA,3)); 5928 end 5929 if isfield(PlotParam.Scalar,'IncrA') 5930 set(handles.num_IncrA,'String',num2str(PlotParam.Scalar.IncrA,3)) 5931 end 5932 set(handles.CheckBW,'Value',PlotParam.Scalar.CheckBW) 5933 if isfield(PlotParam.Scalar,'Opacity')&&isfield(handles,'num_Opacity') 5934 set(handles.num_Opacity,'String',num2str(PlotParam.Scalar.Opacity)) 5935 end 5936 else 5937 set(handles.Scalar,'Visible','off') 5938 end 5939 5940 %% parameter for vector field 5941 if isfield(PlotParam,'Vectors') 5942 set(handles.Vectors,'Visible','on') 5943 if isfield(PlotParam.Vectors,'VecScale') 5944 set(handles.num_VecScale,'String',num2str(PlotParam.Vectors.VecScale,3)) 5945 end 5946 if isfield(PlotParam.Vectors,'MinC')&& isfield(PlotParam.Vectors,'MaxC') 5947 MinC=PlotParam.Vectors.MinC; 5948 MaxC=PlotParam.Vectors.MaxC; 5949 set(handles.num_MinVec,'String', num2str(MinC,3)); 5950 set(handles.num_MaxVec,'String',num2str(MaxC,3)); 5951 list=get(handles.ColorCode,'String'); 5952 ichoice=get(handles.ColorCode,'Value'); 5953 color_option=list{ichoice}; 5954 test3color=strcmp(color_option,'rgb')||strcmp(color_option,'bgr'); 5955 if test3color% need to update color thresholds 5956 set(handles.num_ColCode1,'Visible','on') 5957 set(handles.num_ColCode2,'Visible','on') 5958 set(handles.Slider1,'Visible','on') 5959 set(handles.Slider2,'Visible','on') 5960 set(handles.num_ColCode1,'String',num2str(PlotParam.Vectors.ColCode1,3)) 5961 set(handles.num_ColCode2,'String',num2str(PlotParam.Vectors.ColCode2,3)) 5962 set(handles.Slider1,'Value',(PlotParam.Vectors.ColCode1-MinC)/(MaxC-MinC)) 5963 set(handles.Slider2,'Value',(PlotParam.Vectors.ColCode2-MinC)/(MaxC-MinC)) 5964 else 5965 set(handles.num_ColCode1,'Visible','off') 5966 set(handles.num_ColCode2,'Visible','off') 5967 set(handles.Slider1,'Visible','off') 5968 set(handles.Slider2,'Visible','off') 5969 end 5970 end 5971 else 5972 set(handles.Vectors,'Visible','off') 5973 if isfield(handles,'edit_vect') 5974 set(handles.edit_vect,'Visible','off') 5975 set(handles.record,'Visible','off') 5976 end 5977 end 5905 % if isfield(Coordinates,'AspectRatio') 5906 % set(handles.num_AspectRatio,'String',num2str(Coordinates.AspectRatio)) 5907 % end 5908 % if isfield(Coordinates,'MinX') 5909 % set(handles.num_MinX,'String',num2str(Coordinates.MinX,4)); 5910 % set(handles.num_MaxX,'String',num2str(Coordinates.MaxX,4)); 5911 % set(handles.num_MinY,'String',num2str(Coordinates.MinY,4)); 5912 % set(handles.num_MaxY,'String',num2str(Coordinates.MaxY,4)); 5913 % else 5914 % set(handles.num_MinX,'String',''); 5915 % set(handles.num_MaxX,'String',''); 5916 % set(handles.num_MinY,'String',''); 5917 % set(handles.num_MaxY,'String',''); 5918 % end 5919 % end 5920 % 5921 % %% scalar or image parameters 5922 % if isfield(PlotParam,'Scalar') 5923 % set(handles.Scalar,'Visible','on') 5924 % if isfield(PlotParam.Scalar,'MaxA') 5925 % set(handles.num_MaxA,'String',num2str(PlotParam.Scalar.MaxA,3)); 5926 % end 5927 % if isfield(PlotParam.Scalar,'MinA') 5928 % set(handles.num_MinA,'String',num2str(PlotParam.Scalar.MinA,3)); 5929 % end 5930 % if isfield(PlotParam.Scalar,'IncrA') 5931 % set(handles.num_IncrA,'String',num2str(PlotParam.Scalar.IncrA,3)) 5932 % end 5933 % set(handles.CheckBW,'Value',PlotParam.Scalar.CheckBW) 5934 % if isfield(PlotParam.Scalar,'Opacity')&&isfield(handles,'num_Opacity') 5935 % set(handles.num_Opacity,'String',num2str(PlotParam.Scalar.Opacity)) 5936 % end 5937 % else 5938 % set(handles.Scalar,'Visible','off') 5939 % end 5940 % 5941 % %% parameter for vector field 5942 % if isfield(PlotParam,'Vectors') 5943 % set(handles.Vectors,'Visible','on') 5944 % if isfield(PlotParam.Vectors,'VecScale') 5945 % set(handles.num_VecScale,'String',num2str(PlotParam.Vectors.VecScale,3)) 5946 % end 5947 % if isfield(PlotParam.Vectors,'MinC')&& isfield(PlotParam.Vectors,'MaxC') 5948 % MinC=PlotParam.Vectors.MinC; 5949 % MaxC=PlotParam.Vectors.MaxC; 5950 % set(handles.num_MinVec,'String', num2str(MinC,3)); 5951 % set(handles.num_MaxVec,'String',num2str(MaxC,3)); 5952 % list=get(handles.ColorCode,'String'); 5953 % ichoice=get(handles.ColorCode,'Value'); 5954 % color_option=list{ichoice}; 5955 % test3color=strcmp(color_option,'rgb')||strcmp(color_option,'bgr'); 5956 % if test3color% need to update color thresholds 5957 % set(handles.num_ColCode1,'Visible','on') 5958 % set(handles.num_ColCode2,'Visible','on') 5959 % set(handles.Slider1,'Visible','on') 5960 % set(handles.Slider2,'Visible','on') 5961 % set(handles.num_ColCode1,'String',num2str(PlotParam.Vectors.ColCode1,3)) 5962 % set(handles.num_ColCode2,'String',num2str(PlotParam.Vectors.ColCode2,3)) 5963 % set(handles.Slider1,'Value',(PlotParam.Vectors.ColCode1-MinC)/(MaxC-MinC)) 5964 % set(handles.Slider2,'Value',(PlotParam.Vectors.ColCode2-MinC)/(MaxC-MinC)) 5965 % else 5966 % set(handles.num_ColCode1,'Visible','off') 5967 % set(handles.num_ColCode2,'Visible','off') 5968 % set(handles.Slider1,'Visible','off') 5969 % set(handles.Slider2,'Visible','off') 5970 % end 5971 % end 5972 % else 5973 % set(handles.Vectors,'Visible','off') 5974 % if isfield(handles,'edit_vect') 5975 % set(handles.edit_vect,'Visible','off') 5976 % set(handles.record,'Visible','off') 5977 % end 5978 % end 5978 5979 5979 5980 % --------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.