From 39720d14020b1a962e00463cc4a74f919f872a3e Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Thu, 28 May 2026 00:56:08 +0200 Subject: [PATCH] Backport PR #31759: DOC: Move "Date tick labels" example from "Texts" to "Ticks" --- .../examples/{text_labels_and_annotations => ticks}/date.py | 2 ++ galleries/users_explain/quick_start.py | 2 +- lib/matplotlib/dates.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) rename galleries/examples/{text_labels_and_annotations => ticks}/date.py (97%) diff --git a/galleries/examples/text_labels_and_annotations/date.py b/galleries/examples/ticks/date.py similarity index 97% rename from galleries/examples/text_labels_and_annotations/date.py rename to galleries/examples/ticks/date.py index 880e62e36714..e69d77129109 100644 --- a/galleries/examples/text_labels_and_annotations/date.py +++ b/galleries/examples/ticks/date.py @@ -20,6 +20,8 @@ rotate the tick labels. The last ``Axes`` formats the dates manually, using `~.dates.DateFormatter` to format the dates using the format strings documented at `datetime.date.strftime`. + +.. redirect-from:: /gallery/text_labels_and_annotations/date """ import matplotlib.pyplot as plt diff --git a/galleries/users_explain/quick_start.py b/galleries/users_explain/quick_start.py index f24d90e8495c..e43f580515d6 100644 --- a/galleries/users_explain/quick_start.py +++ b/galleries/users_explain/quick_start.py @@ -457,7 +457,7 @@ def my_plotter(ax, data1, data2, param_dict): # %% # For more information see the date examples -# (e.g. :doc:`/gallery/text_labels_and_annotations/date`) +# (e.g. :doc:`/gallery/ticks/date`) # # For strings, we get categorical plotting (see: # :doc:`/gallery/lines_bars_and_markers/categorical_variables`). diff --git a/lib/matplotlib/dates.py b/lib/matplotlib/dates.py index 225ca8e6ce76..7f9d90574277 100644 --- a/lib/matplotlib/dates.py +++ b/lib/matplotlib/dates.py @@ -20,7 +20,7 @@ .. seealso:: - - :doc:`/gallery/text_labels_and_annotations/date` + - :doc:`/gallery/ticks/date` - :doc:`/gallery/ticks/date_concise_formatter` - :doc:`/gallery/ticks/date_demo_convert`