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
No related tags found
No related merge requests found
Pipeline #11338 passed
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment