From d86e8051671dae15116d0afc258bb1e4e640c9fa Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 7 Mar 2016 01:10:06 -0500 Subject: [PATCH 1/4] docstring added --- lib/matplotlib/table.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/matplotlib/table.py b/lib/matplotlib/table.py index 0556511d5d9e..5b498eae806a 100644 --- a/lib/matplotlib/table.py +++ b/lib/matplotlib/table.py @@ -409,7 +409,21 @@ def _do_cell_alignment(self): cell.set_y(bottoms[row]) def auto_set_column_width(self, col): + """ Given column indexs in either List, Tuple or int. Will be able to + automatically set the columns into optimal sizes. + Args: + col(List): list of indexs + >>>table.auto_set_column_width([-1,0,1]) + + col(Tuple): tuple of indexs + >>>table.auto_set_column_width((-1,0,1)) + + col(int): index integer + >>>table.auto_set_column_width(-1) + >>>table.auto_set_column_width(0) + >>>table.auto_set_column_width(1) + """ # check for col possibility on iteration try: iter(col) From 92ccded264edd0c9f86dc3d2c501b373d26ed79c Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 7 Mar 2016 10:17:12 -0500 Subject: [PATCH 2/4] auto_set_column_width docstring with example given --- lib/matplotlib/table.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/matplotlib/table.py b/lib/matplotlib/table.py index 5b498eae806a..8a12557c372e 100644 --- a/lib/matplotlib/table.py +++ b/lib/matplotlib/table.py @@ -412,6 +412,12 @@ def auto_set_column_width(self, col): """ Given column indexs in either List, Tuple or int. Will be able to automatically set the columns into optimal sizes. + Here is the example of the input, which triger automatic adjustment on + column to optimal size by given index numbers. + -1: the row labling + 0: the 1st column + 1: the 2nd column + Args: col(List): list of indexs >>>table.auto_set_column_width([-1,0,1]) From a5307d1109bb0bdacf6ff7d072d667dec841e2a4 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 7 Mar 2016 15:11:14 -0500 Subject: [PATCH 3/4] docstring pep8 fixed --- lib/matplotlib/table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/table.py b/lib/matplotlib/table.py index 8a12557c372e..23ec6e200d7e 100644 --- a/lib/matplotlib/table.py +++ b/lib/matplotlib/table.py @@ -412,7 +412,7 @@ def auto_set_column_width(self, col): """ Given column indexs in either List, Tuple or int. Will be able to automatically set the columns into optimal sizes. - Here is the example of the input, which triger automatic adjustment on + Here is the example of the input, which triger automatic adjustment on column to optimal size by given index numbers. -1: the row labling 0: the 1st column From 893bfeaa1b07ba5044990d319786240da9cb9f6c Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 7 Mar 2016 20:26:44 -0500 Subject: [PATCH 4/4] unknown CI server failure. compare to d86e805 --- lib/matplotlib/table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/table.py b/lib/matplotlib/table.py index 23ec6e200d7e..74af3ca82577 100644 --- a/lib/matplotlib/table.py +++ b/lib/matplotlib/table.py @@ -413,7 +413,7 @@ def auto_set_column_width(self, col): automatically set the columns into optimal sizes. Here is the example of the input, which triger automatic adjustment on - column to optimal size by given index numbers. + columns to optimal size by given index numbers. -1: the row labling 0: the 1st column 1: the 2nd column