Skip to content

Commit 2338e2e

Browse files
committed
MNT: remove misleading variable name
'l0' (el-zero) looks too much like 10 (ten) to be used as a variable name.
1 parent 6b17610 commit 2338e2e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/matplotlib/axes/_axes.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -2850,8 +2850,6 @@ def errorbar(self, x, y, yerr=None, xerr=None,
28502850
if not iterable(yerr):
28512851
yerr = [yerr] * len(y)
28522852

2853-
l0 = None
2854-
28552853
# make the style dict for the 'normal' plot line
28562854
plot_line_style = dict(base_style)
28572855
plot_line_style.update(**kwargs)
@@ -2896,9 +2894,10 @@ def errorbar(self, x, y, yerr=None, xerr=None,
28962894
eb_cap_style[key] = kwargs[key]
28972895
eb_cap_style['color'] = ecolor
28982896

2897+
data_line = None
28992898
if plot_line:
2900-
l0 = mlines.Line2D(x, y, **plot_line_style)
2901-
self.add_line(l0)
2899+
data_line = mlines.Line2D(x, y, **plot_line_style)
2900+
self.add_line(data_line)
29022901

29032902
barcols = []
29042903
caplines = []
@@ -3067,7 +3066,7 @@ def extract_err(err, data):
30673066
self.autoscale_view()
30683067
self._hold = holdstate
30693068

3070-
errorbar_container = ErrorbarContainer((l0, tuple(caplines),
3069+
errorbar_container = ErrorbarContainer((data_line, tuple(caplines),
30713070
tuple(barcols)),
30723071
has_xerr=(xerr is not None),
30733072
has_yerr=(yerr is not None),

0 commit comments

Comments
 (0)