nx=4000;
ny=300;
nc=100;

x=1:nx;
y=[1:ny].';
z=(y*x);

//curd=driver()
//driver('PNG')
//xinit("/tmp/tmp.png")
tic()
h=scf();
h.color_map=hotcolormap(nc);
Sgrayplot(x,y,z.');
xs2png(h,"/tmp/screen.png")
t=toc();
disp("SCREEN: Time to plot = "+string(t)+"s")
//xend();
//driver(curd);


curd=driver()
tic()
driver('PNG')
xinit("/tmp/headless.png")
h=scf();
h.color_map=hotcolormap(nc);
Sgrayplot(x,y,z.');
xend();
t=toc();
disp("HEADLESS: Time to plot = "+string(t)+"s")
driver(curd);

