From af83f65d2eacb5e682e93960203679a7b63ee572 Mon Sep 17 00:00:00 2001 From: Steffen Rehberg Date: Wed, 29 Dec 2021 13:04:54 +0100 Subject: [PATCH] DOC: Clarify y paramter in Axes.set_title Autopositioning only works if rcParams["axes.titley"] is None in addition to y being None in the function call. If rcParams["axes.titley"] is set to a float, there's no way to enforce autopositioning by function call parameters (passing y=None has no effect in this case). --- lib/matplotlib/axes/_axes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index b8a7c3b2c6bb..51d88ad9e9b9 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -119,8 +119,8 @@ def set_title(self, label, fontdict=None, loc=None, pad=None, *, y=None, y : float, default: :rc:`axes.titley` Vertical Axes loation for the title (1.0 is the top). If - None (the default), y is determined automatically to avoid - decorators on the Axes. + None (the default) and :rc:`axes.titley` is also None, y is + determined automatically to avoid decorators on the Axes. pad : float, default: :rc:`axes.titlepad` The offset of the title from the top of the Axes, in points.