function tst_saveas ()
  close all
  f = figure;
  x1 = (0:0.1:12)';
  x2 = (0:0.01:10)';
  ysin = 100*sin(x1);
  ycos = 10*cos(x2);   
  [p1,h1,h2] = plotyy(x1,ysin ,x2,ycos);
  set(h2,'color','red')  
  set(h1,'color','black') 
  set(p1(1),'fontsize', 18);
  set(p1(2),'fontsize', 18);
  xlabel('x')
  ylabel(p1(1),'100sin(x)')
  ylabel(p1(2),'10cos(x)')
  legend('100sin(x)','10cos(x)','Location','southeast') 
  title('Test saveas function')

  saveas(f,'a.jpg')
  saveas(f,'a.svg')
endfunction
