%%  advanced display 
%% 
%%  Kriging Software Package  version 1.0 beta,   October 29, 1998
%%  Copyright (c) 1998, property of Dezhang Chu and Woods Hole Oceanographic
%%  Institution.  All Rights Reserved.


%% specify contour lines
hkc0=findobj(gcf,'Tag','RadioContour');
if get(hkc0,'value') ==  1
  hkc=findobj(gcf,'Tag','KrigMap');
  hec=findobj(gcf,'Tag','ErrorMap');
  kgstr=get(hkc,'string');
  erstr=get(hec,'string');
  vKrig=str2num(kgstr);
  vErr=str2num(erstr);
else
   vKrig=[];
   vErr=[];
end

%% track line display
htrack=findobj(gcf,'Tag','RadioNONE');
if get(htrack,'value') == 1
   TrackLineCode=1;
end
htrack=findobj(gcf,'Tag','RadioWHITE');
if get(htrack,'value') == 1
   TrackLineCode=2;
end
htrack=findobj(gcf,'Tag','RadioCOLOR');
if get(htrack,'value') == 1
   TrackLineCode=3;
end

%%% figure title
htitle=findobj(gcf,'Tag','FigureTitle');
FigTitle=get(htitle,'string');

%%% Select Colormap
hcolormap=findobj(gcf,'Tag','ColorMapListbox1');
%ColorMap=UserColorMap;
%set(hcolormap,'String',ColorMap,'fontweight','bold');
ncm=17;
index=get(hcolormap,'Value');
if index == ncm+1
   [clrmapfilename, clrmapfilepath]=uigetfile('*.*','Select a Colormap File');
   if isstr(clrmapfilename)
      eval(['load ' '''' clrmapfilepath clrmapfilename '''']);
      indx=find(clrmapfilename == '.');
      if length(indx) > 0
         eval(['newcolormap=' clrmapfilename(1:indx-1) ';'])
      else
         eval(['newcolormap=' clrmapfilename ';'])
      end
      cmd=['save  newcolormap.m newcolormap -ascii'];
      eval(cmd);
      aa=['colormap(newcolormap)'];
      close
      eval(aa)
   end
elseif index == ncm+2
   disp('Option is not availabel !!');
   close
else
   clrmapname=getclrmapname(index);
   pp=['''' clrmapname ''''];
   aa=['colormap(' pp ')'];
   close
   eval(aa);
end

displaykrig