From ed60126cc32bb66d02cfa2859a0a9b2c276d3733 Mon Sep 17 00:00:00 2001 From: Hassan Kibirige Date: Mon, 16 Dec 2024 15:04:45 +0300 Subject: [PATCH] Fix axis_ticks_length for the x-axis --- doc/changelog.qmd | 3 +++ plotnine/themes/themeable.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/changelog.qmd b/doc/changelog.qmd index 657922196..cdc83d3b3 100644 --- a/doc/changelog.qmd +++ b/doc/changelog.qmd @@ -23,6 +23,9 @@ title: Changelog if the `y` aesthetic is mapped to datetime column in another layer. +- Fixed bug for matplotlib>3.10 where the `axis_ticks_length` for the x-axis + had no effect. + ## v0.14.3 (2024-11-26) [![](https://zenodo.org/badge/DOI/10.5281/zenodo.14224336.svg)](https://doi.org/10.5281/zenodo.14224336) diff --git a/plotnine/themes/themeable.py b/plotnine/themes/themeable.py index a20a489cb..369b9c6eb 100644 --- a/plotnine/themes/themeable.py +++ b/plotnine/themes/themeable.py @@ -1037,7 +1037,7 @@ class axis_ticks_major_x(MixinSequenceOfValues): def apply_ax(self, ax: Axes): super().apply_ax(ax) params = ax.xaxis.get_tick_params(which="major") - if not params.get("left", False): + if not params.get("bottom", False): return tick_params = {}