Index: trunk/src/plot_field.m
===================================================================
--- trunk/src/plot_field.m	(revision 206)
+++ trunk/src/plot_field.m	(revision 210)
@@ -241,6 +241,8 @@
 end
 if isfield(PlotParamOut,'MinX')
-set(haxes,'XLim',[PlotParamOut.MinX PlotParamOut.MaxX])
-set(haxes,'YLim',[PlotParamOut.MinY PlotParamOut.MaxY])
+    set(haxes,'XLim',[PlotParamOut.MinX PlotParamOut.MaxX])
+    set(haxes,'YLim',[PlotParamOut.MinY PlotParamOut.MaxY])
+    AxeData.RangeX=[PlotParamOut.MinX PlotParamOut.MaxX];
+    AxeData.RangeY=[PlotParamOut.MinY PlotParamOut.MaxY];
 end
 
@@ -522,5 +524,4 @@
 function [haxes,PlotParamOut,PlotType,errormsg]=plot_plane(Data,CellVarIndex,VarTypeCell,haxes,PlotParam,PosColorbar)
 %-------------------------------------------------------------------
-
 grid(haxes, 'off')
 %default plotting parameters
@@ -756,8 +757,8 @@
             Aline=Aline(~isnan(A));
             if isempty(Aline)
-                 errormsg=['NaN input scalar or image in plot_field'];
+                 errormsg='NaN input scalar or image in plot_field';
                 return
             end
-            MinA=double(min(Aline))
+            MinA=double(min(Aline));
             %MinA=double(min(min(A)));
         else
@@ -769,9 +770,9 @@
                Aline=Aline(~isnan(A));
                if isempty(Aline)
-                 errormsg=['NaN input scalar or image in plot_field'];
+                 errormsg='NaN input scalar or image in plot_field';
                 return
                end
             end
-            MaxA=double(max(Aline))
+            MaxA=double(max(Aline));
            % MaxA=double(max(max(A)));
         else
@@ -969,10 +970,9 @@
     vec_V=reshape(vec_V,1,numel(vec_V));
      MinMaxX=max(vec_X)-min(vec_X);
-    if  ~isfield(PlotParam.Vectors,'AutoVec') || isequal(PlotParam.Vectors.AutoVec,0)|| ~isfield(PlotParam.Vectors,'VecScale')...
-               ||isempty(PlotParam.Vectors.VecScale)||~isa(PlotParam.Vectors.VecScale,'double') %automatic vector scale
-%         scale=[];
-        if test_false %remove false vectors
-            %indsel=find(AxeData.FF==0);%indsel =indices of good vectors
-        else     
+    if  isfield(PlotParam.Vectors,'FixVec') && isequal(PlotParam.Vectors.FixVec,1)&& isfield(PlotParam.Vectors,'VecScale')...
+               &&~isempty(PlotParam.Vectors.VecScale) && isa(PlotParam.Vectors.VecScale,'double') %fixed vector scale
+        scale=PlotParam.Vectors.VecScale;  %impose the length of vector representation
+    else
+        if ~test_false %remove false vectors    
             indsel=1:numel(vec_X);%
         end
@@ -990,7 +990,5 @@
             PlotParam.Vectors.VecScale=scale;%update the 'scale' display
         end
-    else
-        scale=PlotParam.Vectors.VecScale;  %impose the length of vector representation
-    end;
+    end
     
     %record vectors on the plotting axes
@@ -1033,13 +1031,15 @@
        colorlist(nbcolor,:)=[0 0 0]; %add black to the list of colors
        if ~isempty(ivar_FF)
-            ind_flag=find(vec_F~=1 & vec_F~=0 & vec_FF==0);  %flag warning but not false
+          %  ind_flag=find(vec_F~=1 & vec_F~=0 & vec_FF==0);  %flag warning but not false
+            col_vec(vec_F~=1 & vec_F~=0 & vec_FF==0)=nbcolor;
        else
-            ind_flag=find(vec_F~=1 & vec_F~=0);
+           % ind_flag=find(vec_F~=1 & vec_F~=0);
+            col_vec(vec_F~=1 & vec_F~=0)=nbcolor;
        end
-       col_vec(ind_flag)=nbcolor;    
+      % col_vec(ind_flag)=nbcolor;    
     end
     nbcolor=nbcolor+1;
     if ~isempty(ivar_FF)
-        ind_flag=find(vec_FF~=0);
+        %ind_flag=find(vec_FF~=0);
         if isfield(PlotParam.Vectors,'HideFalse') && PlotParam.Vectors.HideFalse==1
             colorlist(nbcolor,:)=[NaN NaN NaN];% no plot of false vectors
@@ -1047,5 +1047,5 @@
             colorlist(nbcolor,:)=[1 0 1];% magenta color
         end
-        col_vec(ind_flag)=nbcolor;
+        col_vec(vec_FF~=0)=nbcolor;
     end
     %plot vectors:
