function siltprofiler_salinity_plot(A,i0,i1,C)
%%
OPT.export = 1;

 FIG = figure;setfig2screensize

var2 = 1; % 1 = Pres/press (handig die verschillende names), 6 = altimeter (can be broken)
var1 = 9; % 9 = Salinity

   varname1 = mkvar(A.varname{var1});
   varname2 = mkvar(A.varname{var2});
   
    
      plot(A.(varname1)(i0:i1),A.(varname2)(i0:i1),'r','linewidth',2)
      hold on
     
      % lay-out
      grid on
      xlabel ([A.varname{var1},' [',A.units{var1},']'])
      ylabel ([A.varname{var2},' [',A.units{var2},']'])
      grid on
      title({A.name,A.datestr})
      
      txt= [num2str(i0),' - ',num2str(i1),' '];
      text(1,0,txt,'units','normalized','horizontalalignment','right','verticalalignment','bottom')

        
      if OPT.export
      print2screensize([filename(A.name),'_',varname1,'.png'])
      end
   
   hold off
   
 
     
   pausedisp
     

try
   close(FIG)
end





