When I plot data using pcolor using ("contemporary") datenum values for the x-axis, pcolor bins the data into one or a few bins together, instead of using the ones given.
An example code which reproduces this problem:
secinday = 24*3600;
t0vec = [2015 05 01 0 0 0];
t0 = datenum(t0vec);
t = t0 + (0:(1/secinday):(1/24-1/secinday));
y = 1:10;
z = rand(10,3600);
surf has the same problem. Anyone know why this happens and how I can prevent it? Or how I can work around it?
It is funny that the problem disappears when one makes the y-axis logarithmic:
But as soon as you make them linear again, the problem reappears.
Note that it only happens for high datenum values. When one takes for example
there is no problem. So my guess is that it has something to do with the small relative difference between a "contemporary" datenum value and the value a second later. So the workaround I currently use is to do t-floor(t0);