diff --git a/src/@dseries/plot.m b/src/@dseries/plot.m index d44a72e601c07eb059abd70ecfee2d12a2ed5c39..4f485f9a8fb7cb04c0f13ead00bbc944df3b1067 100644 --- a/src/@dseries/plot.m +++ b/src/@dseries/plot.m @@ -67,8 +67,12 @@ switch ndseries hh = plot(o.data); end axis tight; - id = get(gca, 'XTick'); - Dates = strings(o.dates(id)); + %remove fractional ticks + ax=gca; + xtick_values = ax.XTick; + integer_indices = fix(xtick_values) == xtick_values; + ax.XTick = xtick_values(integer_indices); + Dates = strings(o.dates(1:sum(integer_indices))); set(gca,'XTickLabel', Dates); case 2 [o0, o1] = align(o, varargin{1});