Watch this Author's files
For my graphs, I had an error that reads
Because my graph had too many horizontal categories, Matlab automatically changes the axis step to a value different than 1. In this case, this code doesn't work.
I had to include after the line 46 the following command to make it work
[x y]=size(a);ticks=1; for j=2:x, ticks=horzcat(ticks,j); end, set(h,'XTick',ticks);