Skip to content
Snippets Groups Projects
Commit 756ca55b authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

plot: deal with fractional ticks

Closes #59
parent 657f8b8e
Branches master-dist
No related tags found
No related merge requests found
Pipeline #11363 passed
......@@ -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});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment