function weektick(ax)
//WEEKTICK(AX)
// Set XTick at each Monday and XTickLabel as "mm-dd" in axes AX - default gca()

if argn(2)==0 then
  ax = gca();
elseif argn(2)>1
  error("There may be at most one input argument.")
end

t = ax.data_bounds(:,1);
t = (ceil(t(1)):floor(t(2)))';

n = weekday(t);

// Mondays
t = t(n==1);

tl = datestr(t, 3);  // "yyyy-mm-dd"
tl = part(tl, 6:10); // "mm-dd"

ax.x_ticks = tlist(["ticks","locations","labels"], t, tl);

endfunction


