clear all
%close all
graphics_toolkit fltk

x = linspace(0,10);
figure(1)
plot(x,sin(x))
xlabel('x'); ylabel('sin(x)')
drawnow()
system("rm test.png");
disp('Now switch to a different screen for 5 seconds, then back')
pause(3)

print test.png
drawnow()
pause(1)

if exist("test.png")==2
  disp("file was created")
else
  disp("no file created")
endif

