Skip to content
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

capsize with default in matplotlibrc #4449

Merged
merged 4 commits into from Jun 16, 2015

Conversation

HDembinski
Copy link

Some people prefer to not have ends caps on their error bars. This patch changes the default value of capsize in various function calls to "None". Inside the body of the function, "None" is then replaced by a default value taken from rcParams (the default value is still 3) under the key "errorbar.capsize". With this patch, end caps can be changed globally or turned off completely through a setting in matplotlibrc.

@tacaswell tacaswell added this to the next point release milestone May 21, 2015
@@ -2630,7 +2633,8 @@ def errorbar(self, x, y, yerr=None, xerr=None,
The linewidth of the errorbar lines. If *None*, use the linewidth.

*capsize*: scalar
The length of the error bar caps in points
The length of the error bar caps in points; if *None*, it will
take the value from ``errorbar.capsize`` :data:`rcParam<matplotlib.rcParams>`.
Copy link
Member

Choose a reason for hiding this comment

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

This line is too long and hitting the pep8 checker.

@tacaswell
Copy link
Member

Left one minor and one major comment.

This looks reasonable to me other wise.

Can you add an entry in https://github.com/matplotlib/matplotlib/blob/master/doc/users/whats_new/rcparams.rst please?

@HDembinski
Copy link
Author

The build has failed checks. I had a look at the output, but I would need some help understanding the error, I don't see how it is related to this patch. Help is appreciated. If this is some because the cap size has to be an integer, I would gladly change that everywhere, but some advice would be appreciated.

@jenshnielsen
Copy link
Member

I think the test error is unrelated. I have restarted the job

@HDembinski
Copy link
Author

Thanks! :)

tacaswell added a commit that referenced this pull request Jun 16, 2015
@tacaswell tacaswell merged commit 61591cf into matplotlib:master Jun 16, 2015
@tacaswell
Copy link
Member

@HDembinski Thank you

@HDembinski HDembinski deleted the capsize-default branch June 16, 2015 15:31
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.

None yet

3 participants