Thanks to visit codestin.com
Credit goes to github.com

Skip to content

docstring added #6123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 13, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion lib/matplotlib/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,27 @@ 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.

Here is the example of the input, which triger automatic adjustment on
columns to optimal size by given index numbers.
-1: the row labling
0: the 1st column
1: the 2nd column

Args:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please use the numpydoc formating?

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the meaning of these integers?

>>>table.auto_set_column_width(0)
>>>table.auto_set_column_width(1)
"""
# check for col possibility on iteration
try:
iter(col)
Expand Down