Skip to content

Commit 0e4b33e

Browse files
committed
referenced isseu in test
1 parent 436ca0d commit 0e4b33e

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

pandas/plotting/_matplotlib/core.py

-2
Original file line numberDiff line numberDiff line change
@@ -1364,10 +1364,8 @@ def _make_plot(self):
13641364
kwds = self.kwds.copy()
13651365
if self._is_series:
13661366
kwds["color"] = colors
1367-
13681367
elif isinstance(colors, dict):
13691368
kwds["color"] = colors[label]
1370-
13711369
else:
13721370
kwds["color"] = colors[i % ncolors]
13731371

pandas/tests/plotting/test_misc.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -420,20 +420,21 @@ def test_get_standard_colors_no_appending(self):
420420

421421
@pytest.mark.slow
422422
def test_dictionary_color(self):
423-
# Test plot color dictionary format
423+
#issue-8193
424+
#Test plot color dictionary format
424425
data_files = ["a", "b"]
425426

426427
expected = [(0.5, 0.24, 0.6), (0.3, 0.7, 0.7)]
427428

428429
df1 = DataFrame(np.random.rand(2, 2), columns=data_files)
429430
dic_color = {"b": (0.3, 0.7, 0.7), "a": (0.5, 0.24, 0.6)}
430431

431-
# Bar color test
432+
#Bar color test
432433
ax = df1.plot(kind="bar", color=dic_color)
433434
colors = [rect.get_facecolor()[0:-1] for rect in ax.get_children()[0:3:2]]
434435
assert all(color == expected[index] for index, color in enumerate(colors))
435436

436-
# Line color test
437+
#Line color test
437438
ax = df1.plot(kind="line", color=dic_color)
438439
colors = [rect.get_color() for rect in ax.get_lines()[0:2]]
439440
assert all(color == expected[index] for index, color in enumerate(colors))

0 commit comments

Comments
 (0)