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

Skip to content

Commit 2ebb682

Browse files
committed
Fix minor bugs after refactor
1 parent d083438 commit 2ebb682

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎proplot/axes/plot.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,10 +1681,10 @@ def _apply_lines(
16811681
# Parse input arguments
16821682
method = kwargs.pop('_method')
16831683
name = method.__name__
1684-
args = list(args)
16851684
colors = _not_none(color=color, colors=colors)
16861685
linestyles = _not_none(linestyle=linestyle, linestyles=linestyles)
16871686
linewidths = _not_none(lw=lw, linewidth=linewidth, linewidths=linewidths)
1687+
args = list(args)
16881688
if len(args) > 3:
16891689
raise ValueError(f'Expected 1-3 positional args, got {len(args)}.')
16901690
if len(args) == 2: # empty possible
@@ -1759,9 +1759,9 @@ def _apply_scatter(
17591759
"""
17601760
# Manage input arguments
17611761
method = kwargs.pop('_method')
1762+
args = list(args)
17621763
if len(args) > 4:
17631764
raise ValueError(f'Expected 1-4 positional arguments, got {len(args)}.')
1764-
args = list(args)
17651765
if len(args) == 4:
17661766
c = _not_none(c_positional=args.pop(-1), c=c)
17671767
if len(args) == 3:
@@ -1861,10 +1861,10 @@ def _apply_fill_between(
18611861
name = method.__name__
18621862
sx = 'y' if 'x' in name else 'x' # i.e. fill_betweenx
18631863
sy = 'x' if sx == 'y' else 'y'
1864-
args = list(args)
18651864
stack = _not_none(stack=stack, stacked=stacked)
18661865
color = _not_none(color=color, facecolor=facecolor)
18671866
linewidth = _not_none(lw=lw, linewidth=linewidth, default=0)
1867+
args = list(args)
18681868
if len(args) > 4:
18691869
raise ValueError(f'Expected 1-4 positional args, got {len(args)}.')
18701870
if len(args) == 4:
@@ -1988,6 +1988,7 @@ def _apply_bar(
19881988
color = _not_none(color=color, facecolor=facecolor)
19891989
linewidth = _not_none(lw=lw, linewidth=linewidth, default=rc['patch.linewidth'])
19901990
kwargs.update({'linewidth': linewidth, 'edgecolor': edgecolor})
1991+
args = list(args)
19911992
if len(args) > 4:
19921993
raise ValueError(f'Expected 1-4 positional args, got {len(args)}.')
19931994
if len(args) == 4 and stack:
@@ -2631,7 +2632,7 @@ def apply_cycle(
26312632
# Parse input arguments
26322633
# NOTE: Requires standardize_1d wrapper before reaching this.
26332634
method = kwargs.pop('_method')
2634-
errobjs = kwargs.pop('_errobjs')
2635+
errobjs = kwargs.pop('_errobjs', None)
26352636
name = method.__name__
26362637
plot = name in ('plot',)
26372638
scatter = name in ('scatter',)

0 commit comments

Comments
 (0)