From e5bcfa8e231d2e3e47926562602b6839792ff1e9 Mon Sep 17 00:00:00 2001 From: vishalBindal Date: Sat, 4 Apr 2020 02:44:43 +0530 Subject: [PATCH 1/3] Add return field to documentation of 'get_major_ticks' --- lib/matplotlib/axis.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/matplotlib/axis.py b/lib/matplotlib/axis.py index 832165e85222..f1b23312aa74 100644 --- a/lib/matplotlib/axis.py +++ b/lib/matplotlib/axis.py @@ -1320,7 +1320,13 @@ def get_minor_formatter(self): return self.minor.formatter def get_major_ticks(self, numticks=None): - """Get the tick instances; grow as necessary.""" + """ + Get the tick instances; grow as necessary. + + Returns + ------- + list of `.Tick` objects + """ if numticks is None: numticks = len(self.get_majorticklocs()) From de62c6f1e6db4658a42a3b9dba3d22892a0c12c3 Mon Sep 17 00:00:00 2001 From: vishalBindal Date: Sun, 5 Apr 2020 03:53:37 +0530 Subject: [PATCH 2/3] Change documentation of get_major_ticks to remove irrelevant details --- lib/matplotlib/axis.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/matplotlib/axis.py b/lib/matplotlib/axis.py index f1b23312aa74..e2adc3b9ca94 100644 --- a/lib/matplotlib/axis.py +++ b/lib/matplotlib/axis.py @@ -1320,13 +1320,7 @@ def get_minor_formatter(self): return self.minor.formatter def get_major_ticks(self, numticks=None): - """ - Get the tick instances; grow as necessary. - - Returns - ------- - list of `.Tick` objects - """ + r"""Return the list of major `.Tick`\s.""" if numticks is None: numticks = len(self.get_majorticklocs()) From d99bf41f23f357e2e61279e6aa2fade003e88291 Mon Sep 17 00:00:00 2001 From: vishalBindal Date: Sun, 5 Apr 2020 04:00:53 +0530 Subject: [PATCH 3/3] Change documentation of get_minor_ticks to list return type --- lib/matplotlib/axis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/axis.py b/lib/matplotlib/axis.py index e2adc3b9ca94..a68201068747 100644 --- a/lib/matplotlib/axis.py +++ b/lib/matplotlib/axis.py @@ -1334,7 +1334,7 @@ def get_major_ticks(self, numticks=None): return self.majorTicks[:numticks] def get_minor_ticks(self, numticks=None): - """Get the minor tick instances; grow as necessary.""" + r"""Return the list of minor `.Tick`\s.""" if numticks is None: numticks = len(self.get_minorticklocs())