Index: trunk/src/export_fct/quivercol.m
===================================================================
--- trunk/src/export_fct/quivercol.m	(revision 1102)
+++ 	(revision )
@@ -1,12 +1,0 @@
-%'quiver_export': plot vector fields and save figures for project 
-%------------------------------------------------------------------------
-
-function quiver_export(handles)
-%------------------------------------------------------------------------
-
-%% get input data
-Data_uvmat=get(handles.uvmat,'UserData');
-Data=Data_uvmat.Field; %get the current plotted field
-
-
-
Index: trunk/src/plot_field.m
===================================================================
--- trunk/src/plot_field.m	(revision 1102)
+++ trunk/src/plot_field.m	(revision 1103)
@@ -865,11 +865,11 @@
     
     %set for grey scale setting
+    ColorMap='default';
     if isfield(PlotParam.Scalar,'CheckBW') && ~isempty(PlotParam.Scalar.CheckBW)
-        BW=PlotParam.Scalar.CheckBW; %BW=0 color imposed, else gray scale imposed.
-    else % BW imposed automatically chosen
-        BW=(siz==2) && (isa(A,'uint8')|| isa(A,'uint16'));% non color images represented in gray scale by default
-        PlotParamOut.Scalar.CheckBW=BW;
-    end
-    
+        ColorMap=PlotParam.Scalar.CheckBW; %BW=0 color imposed, else gray scale imposed.
+    elseif ((siz==2) && (isa(A,'uint8')|| isa(A,'uint16')))% non color images represented in gray scale by default
+        ColorMap='grayscale';
+    end
+    PlotParamOut.Scalar.CheckBW=ColorMap;
     % determine the plot option 'image' or 'contours'
     CheckContour=0; %default
@@ -915,5 +915,5 @@
     PlotParamOut.Scalar.Npx=size(A,2);
     PlotParamOut.Scalar.Npy=size(A,1);
-    %     if siz==2
+    
     % case of contour plot
     if CheckContour
@@ -946,7 +946,4 @@
         y_cont=Coord_y(1):-sizpy:Coord_y(end); % pixel x coordinates for image display
         
-        %axes(haxes)% set the input axes handle as current axis
-        
-        % colormap(map);
         tag_axes=get(haxes,'Tag');% axes tag
         Opacity=1;
@@ -972,14 +969,17 @@
         %determine the color scale and map
         caxis([abscontmin abscontmax])
-        if BW
+        if strcmp(ColorMap,'grayscale')
             vec=linspace(0,1,(abscontmax-abscontmin)/interval);%define a greyscale colormap with steps interval
             map=[vec' vec' vec'];
             colormap(map);
-        else
-            colormap('jet'); % default matlab colormap ('jet')
+        elseif strcmp(ColorMap,'BuYlRd')
+            hh=load('BuYlRd.mat');
+            colormap(hh.BuYlRd);
+        else
+            colormap(ColorMap); 
         end
     else %usual images (no contour)
         % set  colormap for  image display
-        if BW
+        if strcmp(ColorMap,'grayscale')
             vec=linspace(0,1,255);%define a linear greyscale colormap
             map=[vec' vec' vec'];
@@ -988,9 +988,12 @@
                 A=uint16(sum(A,3));%sum the three color components for color images displayed with BW option
             end
+        elseif strcmp(ColorMap,'BuYlRd')
+            hh=load('BuYlRd.mat');
+            colormap(hh.BuYlRd);
         else
             if siz==3 && CheckFixScalar % true color images rescaled by MaxA
                   A=uint8(255*double(A)/double(MaxA));
             end
-            colormap('default'); % standard false colors for div, vort , scalar fields
+            colormap(ColorMap); % standard false colors for div, vort , scalar fields
         end
         
@@ -1123,5 +1126,5 @@
 if test_vec
    %vector scale representation
-    if size(vec_U,1)==numel(vec_Y) && size(vec_U,2)==numel(vec_X); % x, y  coordinate variables
+    if size(vec_U,1)==numel(vec_Y) && size(vec_U,2)==numel(vec_X) % x, y  coordinate variables
         [vec_X,vec_Y]=meshgrid(vec_X,vec_Y);
     end   
@@ -1201,6 +1204,5 @@
     
     % take flags into account: add flag colors to the list of colors
-    sizlist=size(colorlist);
-    nbcolor=sizlist(1);
+    nbcolor=size(colorlist,1);
     if test_black 
        nbcolor=nbcolor+1;
@@ -1223,5 +1225,4 @@
     %plot vectors:
     quiresetn(haxes,vec_X,vec_Y,vec_U,vec_V,scale,colorlist,col_vec);   
-
 else
     hvec=findobj(haxes,'Tag','vel');
@@ -1231,5 +1232,4 @@
     PlotParamOut=rmfield(PlotParamOut,'Vectors');
 end
-% nbvar=0;
 
 %store the coordinate extrema occupied by the field
@@ -1297,19 +1297,17 @@
 alpha=0.3 ;%length arrow
 rot=alpha*[cos(theta) -sin(theta); sin(theta) cos(theta)]';
+
 %find the existing lines
 h=findobj(haxes,'Tag','vel');% search existing lines in the current axes
 sizh=size(h);
-%set(h,'EraseMode','xor');
 set(haxes,'NextPlot','replacechildren');
 
-%drawnow
 %create lines (if no lines) or modify them
 if ~isequal(size(col_vec),size(x))
     col_vec=ones(size(x));% case of error in col_vec input
 end
-sizlist=size(colorlist);
-ncolor=sizlist(1);
-
-for icolor=1:ncolor
+nbcolor=size(colorlist,1);
+
+for icolor=1:nbcolor
     %determine the line positions for each color icolor
     ind=find(col_vec==icolor);
@@ -1363,6 +1361,6 @@
     end
 end
-if sizh(1) > 2*ncolor
-    for icolor=ncolor+1 : sizh(1)/2%delete additional objects
+if sizh(1) > 2*nbcolor
+    for icolor=nbcolor+1 : sizh(1)/2 %delete additional objects
         delete(h(2*icolor-1))
         delete(h(2*icolor))
Index: trunk/src/set_col_vec.m
===================================================================
--- trunk/src/set_col_vec.m	(revision 1102)
+++ trunk/src/set_col_vec.m	(revision 1103)
@@ -1,5 +1,5 @@
 %'set_col_vec': % sets the color code for vectors depending on a scalar and input parameters (used for plot_field)
 %-----------------------------------------------------------------------
-%function [colorlist,col_vec,minC,ColCode1,ColCode2,maxC]=colvec(colcode,vec_C)
+%function [colorlist,col_vec,minC,ColCode1,ColCode2,maxC]=set_col_vec(colcode,vec_C)
 %-----------------------------------------------------------------------
 %OUTPUT
@@ -8,8 +8,9 @@
 %minC, maxC: min and max of vec_C
 %ColCode1, ColCode2: absolute threshold in vec_C corresponding to colcode.ColCode1 and colcode.ColCode2
+%
 %INPUT
 % colcode: struture setting the colorcode for vectors
 %    colcode.CName: 'ima_cor','black','white',...
-%    colcode.ColorCode ='black', 'white', 'rgb','brg', '64 colors'
+%    colcode.ColorCode ='black', 'white', 'rgb','brg', '64 colors','BuYlRd'
 %    colcode.CheckFixVecColor =0; thresholds scaling relative to min and max, =1 fixed thresholds
 %    colcode.MinVec; min
@@ -42,5 +43,5 @@
 col_vec=ones(size(vec_C));%all vectors at color#1 by default
 
-if ~isstruct(colcode),colcode=[];end;
+if ~isstruct(colcode),colcode=[];end
 colcode_out=colcode;%default
 if isempty(vec_C) || ~isnumeric(vec_C)
@@ -55,7 +56,7 @@
     colorlist=[0 0 1]; %blue
 else
-    if strcmp(colcode.ColorCode,'black')
+    if strcmp(colcode.ColorCode,'black')% black vectors
         colorlist(1,:)=[0 0 0];%black
-    elseif strcmp(colcode.ColorCode,'white')
+    elseif strcmp(colcode.ColorCode,'white')% white vectors
         colorlist(1,:)=[1 1 1];%white
     else
@@ -64,4 +65,5 @@
 end
 
+%% colored vectors
 if check_multicolors
     if (isfield(colcode,'CheckFixVecColor') && isequal(colcode.CheckFixVecColor,1))
@@ -97,12 +99,17 @@
         end
     else
+        switch colcode.ColorCode
+            case '64 colors'
         colorjet=jet;% ususal colormap from blue to red
-        sizlist=size(colorjet);
+            case 'BuYlRd'
+            hh=load('BuYlRd.mat');
+            colorjet=hh.BuYlRd;
+        end
+        sizlist=size(colorjet,1);
         indsel=ceil((sizlist(1)/64)*(1:64));
         colorlist(:,1)=colorjet(indsel,1);
         colorlist(:,2)=colorjet(indsel,2);
         colorlist(:,3)=colorjet(indsel,3);
-        sizlist=size(colorlist);
-        nblevel=sizlist(1);
+        nblevel=size(colorlist,1);
         col2_1=maxC-minC;
         col_vec=1+floor(nblevel*(vec_C-minC)/col2_1);
Index: trunk/src/uvmat.m
===================================================================
--- trunk/src/uvmat.m	(revision 1102)
+++ trunk/src/uvmat.m	(revision 1103)
@@ -894,9 +894,13 @@
 function MenuExportCustom_Callback(hObject, eventdata, handles)
 export_fct_name=get(handles.MenuExportCustom,'label');
-current_dir=pwd;%current working dir
-cd(fullfile(fileparts(which('uvmat')),'export_fct'))
-export_handle=str2func(export_fct_name);
-cd(current_dir)
-export_handle(handles)
+if strcmp(export_fct_name,'user export fct.')
+    MenuExportMore_Callback(hObject, eventdata, handles)
+else
+    current_dir=pwd;%current working dir
+    cd(fullfile(fileparts(which('uvmat')),'export_fct'))
+    export_handle=str2func(export_fct_name);
+    cd(current_dir)
+    export_handle(handles)
+end
         
 % --------------------------------------------------------------------
@@ -2425,5 +2429,14 @@
     ColorType=FileInfo.ColorType;%='truecolor' for color images
 end
-set(handles.CheckBW,'Value',strcmp(ColorType,'grayscale'))% select handles.CheckBW if grayscale image
+if strcmp(ColorType,'truecolor')
+    set(handles.CheckBW,'String',{'grayscale';'truecolor'})
+else 
+    set(handles.CheckBW,'String',{'grayscale';'default';'jet';'BuYlRd'})
+end
+if strcmp(ColorType,'grayscale')
+    set(handles.CheckBW,'Value',1)
+else
+    set(handles.CheckBW,'Value',2)
+end
 
 %% read parameters (time, geometric calibration..) from a documentation file (.xml advised)
@@ -5452,9 +5465,5 @@
 function CheckFixScalar_Callback(hObject, eventdata, handles)
 %------------------------------------------------------------------------
-test=get(handles.CheckFixScalar,'Value');
-if test
-%     set(handles.CheckFixScalar,'BackgroundColor',[1 1 0])
-else
-%     set(handles.CheckFixScalar,'BackgroundColor',[0.7 0.7 0.7])
+if ~get(handles.CheckFixScalar,'Value')
     update_plot(handles);
 end
@@ -5478,11 +5487,7 @@
     set(handles.num_IncrA,'Visible','on')
     set(handles.num_IncrA,'String','')% refresh contour interval
-%     set(handles.opacity_txt,'Visible','off')
-%     set(handles.num_Opacity,'Visible','off')
 else % option 'image'
     set(handles.interval_txt,'Visible','off')
     set(handles.num_IncrA,'Visible','off')
-%     set(handles.opacity_txt,'Visible','on')
-%     set(handles.num_Opacity,'Visible','on')
 end
 update_plot(handles);
@@ -5562,5 +5567,5 @@
         enable_bounds='on';
         enable_scalar='on';
-    case '64 colors'
+    case {'64 colors','BuYlRd'}
         enable_bounds='on';
         enable_scalar='on';
@@ -6109,105 +6114,4 @@
 
 
-
-% %TODO: use to modify fill_GUI
-% %'write_plot_param': update the plotting parameters on the uvmat or view_field interface after a plotting operation
-% function write_plot_param(handles,PlotParam)
-% %% axes
-% if isempty(PlotParam.Axes)
-%     set(handles.Axes,'Visible','off')
-%     set(handles.PlotAxes,'Visible','off')
-%     set(handles.text_display,'Visible','off')
-%     set(handles.TableDisplay,'Visible','on')
-% else
-%     set(handles.Axes,'Visible','on')
-%     set(handles.PlotAxes,'Visible','on')
-%     set(handles.text_display,'Visible','on')
-% %     if isfield(handles,'TableDisplay')
-% %     set(handles.TableDisplay,'Visible','off')
-% %     end
-%     Coordinates=PlotParam.Axes;
-%     if isfield(Coordinates,'CheckFixAspectRatio')
-%         if Coordinates.CheckFixAspectRatio
-%             set(handles.CheckFixAspectRatio,'Value',1)
-%         else
-%             set(handles.CheckFixAspectRatio,'Value',0)
-% 
-%         end
-%     end
-%     if isfield(Coordinates,'AspectRatio')
-%         set(handles.num_AspectRatio,'String',num2str(Coordinates.AspectRatio))
-%     end
-%     if isfield(Coordinates,'MinX')
-%         set(handles.num_MinX,'String',num2str(Coordinates.MinX,4));
-%         set(handles.num_MaxX,'String',num2str(Coordinates.MaxX,4));
-%         set(handles.num_MinY,'String',num2str(Coordinates.MinY,4));
-%         set(handles.num_MaxY,'String',num2str(Coordinates.MaxY,4));
-%     else
-%         set(handles.num_MinX,'String','');
-%         set(handles.num_MaxX,'String','');
-%         set(handles.num_MinY,'String','');
-%         set(handles.num_MaxY,'String','');
-%     end
-% end
-% 
-% %% scalar or image parameters
-% if isfield(PlotParam,'Scalar')
-%     set(handles.Scalar,'Visible','on')
-%     if isfield(PlotParam.Scalar,'MaxA')
-%         set(handles.num_MaxA,'String',num2str(PlotParam.Scalar.MaxA,3));
-%     end
-%     if isfield(PlotParam.Scalar,'MinA')
-%         set(handles.num_MinA,'String',num2str(PlotParam.Scalar.MinA,3));
-%     end
-%     if isfield(PlotParam.Scalar,'IncrA')
-%         set(handles.num_IncrA,'String',num2str(PlotParam.Scalar.IncrA,3))
-%     end
-%     set(handles.CheckBW,'Value',PlotParam.Scalar.CheckBW)
-%     if isfield(PlotParam.Scalar,'Opacity')&&isfield(handles,'num_Opacity')
-%         set(handles.num_Opacity,'String',num2str(PlotParam.Scalar.Opacity))
-%     end
-% else
-%     set(handles.Scalar,'Visible','off')
-% end
-% 
-% %% parameter for vector field
-% if isfield(PlotParam,'Vectors')
-%     set(handles.Vectors,'Visible','on')
-%     if isfield(PlotParam.Vectors,'VecScale')
-%         set(handles.num_VecScale,'String',num2str(PlotParam.Vectors.VecScale,3))
-%     end
-%     if isfield(PlotParam.Vectors,'MinC')&& isfield(PlotParam.Vectors,'MaxC')
-%         MinC=PlotParam.Vectors.MinC;
-%         MaxC=PlotParam.Vectors.MaxC;
-%         set(handles.num_MinVec,'String', num2str(MinC,3));
-%         set(handles.num_MaxVec,'String',num2str(MaxC,3));
-%         list=get(handles.ColorCode,'String');
-%         ichoice=get(handles.ColorCode,'Value');
-%         color_option=list{ichoice};
-%         test3color=strcmp(color_option,'rgb')||strcmp(color_option,'bgr');
-%         if test3color% need to update color thresholds
-%             set(handles.num_ColCode1,'Visible','on')
-%             set(handles.num_ColCode2,'Visible','on')
-%             set(handles.Slider1,'Visible','on')
-%             set(handles.Slider2,'Visible','on')
-%             set(handles.num_ColCode1,'String',num2str(PlotParam.Vectors.ColCode1,3))
-%             set(handles.num_ColCode2,'String',num2str(PlotParam.Vectors.ColCode2,3))
-%             set(handles.Slider1,'Value',(PlotParam.Vectors.ColCode1-MinC)/(MaxC-MinC))
-%             set(handles.Slider2,'Value',(PlotParam.Vectors.ColCode2-MinC)/(MaxC-MinC))
-%         else
-%             set(handles.num_ColCode1,'Visible','off')
-%             set(handles.num_ColCode2,'Visible','off')
-%             set(handles.Slider1,'Visible','off')
-%             set(handles.Slider2,'Visible','off')
-%         end
-%     end
-% else
-%     set(handles.Vectors,'Visible','off')
-%     if isfield(handles,'edit_vect')
-%         set(handles.edit_vect,'Visible','off')
-%         set(handles.record,'Visible','off')
-%     end
-% end
-
 % --------------------------------------------------------------------
 % --- Executes on button press in CheckTable.
