Skip to content
Snippets Groups Projects
Verified Commit e2d2f85e authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Fix issue #59.

Dates were only shown on the x-axis for yearly data.
parent c4668b5a
Branches
Tags
No related merge requests found
Pipeline #11338 passed
...@@ -56,22 +56,8 @@ switch ndseries ...@@ -56,22 +56,8 @@ switch ndseries
end end
axis tight; axis tight;
id = get(gca, 'XTick'); id = get(gca, 'XTick');
if isequal(id(1),0) Dates = strings(o.dates(id));
dates = strings([o.dates(1)-1,o.dates(id(2:end))]); set(gca,'XTickLabel', Dates);
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
case 2 case 2
[o0, o1] = align(o, varargin{1}); [o0, o1] = align(o, varargin{1});
if isequal(nvariables,1) if isequal(nvariables,1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment