Your Octave example reverts to 5-day gridlines, which is the issue, it has altered the x-ticks
now if you change those x-ticks it will stretch them out to fit 2- days like I said
I dont think its worth investigating much further for 'this' discussion as we have 2 solutions, and I like the 'keepticks' and 'keeplimits'
but it probably should be rasied as a bug for Octave.
One would expect the xticks to be unaffected
And Matlab just appears to be on crack in your example... unless Tues 1 is from the next month, which is only thing I can imagine, it is as though it has set the xticks to xlim (x limits of the plot asa matrix [min, max] )