From 6acd1ced31ba2faad477269091e3348f570a6188 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Wed, 25 Mar 2020 16:24:37 +0100 Subject: [PATCH] Turn fontdict & minor into kwonly parameters for set_{x,y}ticklabels. This is consistent with the general trend of making "minor" a kwonly param, and will help in making set_{x,y}ticklabels just a thin wrapper around Axis.set_ticklabels. --- doc/api/next_api_changes/deprecations.rst | 3 +++ lib/matplotlib/axes/_base.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/doc/api/next_api_changes/deprecations.rst b/doc/api/next_api_changes/deprecations.rst index c5e2db4116ea..560c43c2c0fb 100644 --- a/doc/api/next_api_changes/deprecations.rst +++ b/doc/api/next_api_changes/deprecations.rst @@ -395,3 +395,6 @@ This method is deprecated. Use the ``GridSpec.nrows``, ``GridSpec.ncols``, Qt4-based backends ~~~~~~~~~~~~~~~~~~ The qt4agg and qt4cairo backends are deprecated. + +*fontdict* and *minor* parameters of `.Axes.set_xticklabels` and `.Axes.set_yticklabels` will become keyword-only +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/lib/matplotlib/axes/_base.py b/lib/matplotlib/axes/_base.py index a8baddedd6d8..9088b6c3df9a 100644 --- a/lib/matplotlib/axes/_base.py +++ b/lib/matplotlib/axes/_base.py @@ -3422,6 +3422,7 @@ def get_xticklabels(self, minor=False, which=None): """ return self.xaxis.get_ticklabels(minor=minor, which=which) + @cbook._make_keyword_only("3.3", "fontdict") def set_xticklabels(self, labels, fontdict=None, minor=False, **kwargs): """ Set the x-tick labels with list of string labels. @@ -3815,6 +3816,7 @@ def get_yticklabels(self, minor=False, which=None): """ return self.yaxis.get_ticklabels(minor=minor, which=which) + @cbook._make_keyword_only("3.3", "fontdict") def set_yticklabels(self, labels, fontdict=None, minor=False, **kwargs): """ Set the y-tick labels with list of string labels. pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy