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

Skip to content

fix axes barh default align option document #7758

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
Jan 8, 2017

Conversation

lspvic
Copy link
Contributor

@lspvic lspvic commented Jan 7, 2017

Since 2.0, default align option of bar and barh have changed to 'center', and the docstring of bar has been updated, but that of barh is not. This PR fix the docstring as bar.

In addition, the default align option of bar is not presented in the docstring like:

default: 'center'

I'm not quite sure this will be appended to end of the docstring, because some other options in this page give the default value while some are not. If this default value should be appended, I will update this PR.

@@ -2259,7 +2259,7 @@ def barh(self, bottom, width, height=0.8, left=None, **kwargs):
dictionary of kwargs to be passed to errorbar method. `ecolor` and
`capsize` may be specified here rather than as independent kwargs.

align : ['edge' | 'center'], optional, default: 'edge'
align : ['edge' | 'center'], optional
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 change this to use the format of bar with braces? The default is the first item, so change the order.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@QuLogic Done. The direction words are really fallible and I checked several time and being afraid to make mistakes.

@tacaswell tacaswell added this to the 2.0 (style change major release) milestone Jan 7, 2017
@tacaswell
Copy link
Member

@lspvic I went ahead and added a commit to fix the whitespace issues, I hope you do not mind.

@tacaswell
Copy link
Member

Who ever merges this, please remember to backport it!

@lspvic
Copy link
Contributor Author

lspvic commented Jan 8, 2017

@tacaswell Never mind.

@codecov-io
Copy link

Current coverage is 62.12% (diff: 100%)

Merging #7758 into master will not change coverage

@@             master      #7758   diff @@
==========================================
  Files           174        174          
  Lines         56028      56028          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          34805      34805          
  Misses        21223      21223          
  Partials          0          0          

Powered by Codecov. Last update 1fa4dd7...3be512a

@phobson phobson merged commit eba130f into matplotlib:master Jan 8, 2017
phobson added a commit that referenced this pull request Jan 8, 2017
DOC: fix Axes.barh default alignment option
@phobson
Copy link
Member

phobson commented Jan 8, 2017

backported to v2.x branch as c4b655b

@lspvic lspvic deleted the doc-barh-align branch January 9, 2017 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants