From c7fb0bd5177ecf5c7df00bd2d821a576b4e43127 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Argos=29?=
 <stepan@adjemian.eu>
Date: Wed, 19 Feb 2025 10:09:33 +0100
Subject: [PATCH] Fix issue #59.

Dates were only shown on the x-axis for yearly data.

(cherry picked from commit e2d2f85e36cedb7dc77bcc9fc8e60d044835aa12)
---
 src/@dseries/plot.m | 22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)

diff --git a/src/@dseries/plot.m b/src/@dseries/plot.m
index 3b63cd0..2c9c9b6 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
-- 
GitLab