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

Skip to content

BUG : errorbar does not respect lines.linestyle rcparam #2738

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2014-01-15 changed default value of `fmt` kwarg of `errorbar` from '-' -> '' so
that `errorbar` will respect `lines.linestyle` for drawing the line.

2013-05-18 Added support for arbitrary rasterization resolutions to the
SVG backend. Previously the resolution was hard coded to 72
dpi. Now the backend class takes a image_dpi argument for
Expand Down
10 changes: 10 additions & 0 deletions doc/api/api_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ For new features that were added to matplotlib, please see
Changes in 1.3.x
================

* changed default value of `fmt` kwarg of `errorbar` from `'-'` to
`''` so that `errorbar` will respect `lines.linestyle` for drawing
the line. I think the only scenario where this will break reverse
compatibility is cases where users have set a non-default value for
`lines.linestyle`, but do not want the lines drawn by `errorbar` to
respect that. I think that this use case is broken because
`lines.linestyle` should be respected by plotting functions which
draw lines.


Changes in 1.3.1
----------------

Expand Down
3 changes: 1 addition & 2 deletions lib/matplotlib/axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5484,7 +5484,7 @@ def pie(self, x, explode=None, labels=None, colors=None,

@docstring.dedent_interpd
def errorbar(self, x, y, yerr=None, xerr=None,
fmt='-', ecolor=None, elinewidth=None, capsize=3,
fmt='', ecolor=None, elinewidth=None, capsize=3,
barsabove=False, lolims=False, uplims=False,
xlolims=False, xuplims=False, errorevery=1, capthick=None,
**kwargs):
Expand Down Expand Up @@ -5586,7 +5586,6 @@ def errorbar(self, x, y, yerr=None, xerr=None,
.. plot:: mpl_examples/statistics/errorbar_demo.py

"""

if errorevery < 1:
raise ValueError(
'errorevery has to be a strictly positive integer')
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2679,7 +2679,7 @@ def csd(x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
@_autogen_docstring(Axes.errorbar)
def errorbar(x, y, yerr=None, xerr=None, fmt='-', ecolor=None, elinewidth=None,
def errorbar(x, y, yerr=None, xerr=None, fmt='', ecolor=None, elinewidth=None,
capsize=3, barsabove=False, lolims=False, uplims=False,
xlolims=False, xuplims=False, errorevery=1, capthick=None,
hold=None, **kwargs):
Expand Down