diff --git a/src/@dseries/plot.m b/src/@dseries/plot.m index 3b63cd0d2c9d20e743308b2925e8e7502c0bfde2..2c9c9b6d467c4b13e4648268f86ba4e2308566d4 100644 --- a/src/@dseries/plot.m +++ b/src/@dseries/plot.m @@ -55,23 +55,9 @@ switch ndseries hh = plot(o.data); end axis tight; - id = get(gca,'XTick'); - if isequal(id(1),0) - dates = strings([o.dates(1)-1,o.dates(id(2:end))]); - skip_relabeling=0; - else - ID = id(find(isint(id))); - if any(ID<o.dates(1).double) || any(ID>o.dates(end).double) - skip_relabeling=1; %hold on was used so that axis tight did not restrict current xlim to dseries used. - else - set(gca,'XTick',ID); - dates = strings(o.dates(ID)); - skip_relabeling=0; - end - end - if ~skip_relabeling - set(gca,'XTickLabel',dates); - end + id = get(gca, 'XTick'); + Dates = strings(o.dates(id)); + set(gca,'XTickLabel', Dates); case 2 [o0, o1] = align(o, varargin{1}); if isequal(nvariables,1) @@ -89,4 +75,4 @@ end if nargout h = hh; -end \ No newline at end of file +end