From fac519b70a3b0624f5e919c35e42b45b961a9472 Mon Sep 17 00:00:00 2001 From: Nick Foti Date: Tue, 30 Jul 2013 12:20:26 -0400 Subject: [PATCH] Fixed issue #4345. --- doc/source/release.rst | 2 ++ doc/source/v0.13.0.txt | 3 +++ pandas/tests/test_graphics.py | 5 ++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/source/release.rst b/doc/source/release.rst index e9af4ccf50dc4..cf81456b73e54 100644 --- a/doc/source/release.rst +++ b/doc/source/release.rst @@ -74,6 +74,8 @@ pandas 0.13 (:issue:`4102`, :issue:`4014`) in ``*.hist`` plotting methods - Fixed bug in ``PeriodIndex.map`` where using ``str`` would return the str representation of the index (:issue:`4136`) + - Fixed test failure ``test_time_series_plot_color_with_empty_kwargs`` when + using custom matplotlib default colors (:issue:`4345`) - Fix running of stata IO tests. Now uses temporary files to write (:issue:`4353`) - Fixed an issue where ``DataFrame.sum`` was slower than ``DataFrame.mean`` diff --git a/doc/source/v0.13.0.txt b/doc/source/v0.13.0.txt index d0fa99165cb82..2d46507f061a5 100644 --- a/doc/source/v0.13.0.txt +++ b/doc/source/v0.13.0.txt @@ -51,6 +51,9 @@ Bug Fixes - Fixed bug in ``PeriodIndex.map`` where using ``str`` would return the str representation of the index (:issue:`4136`) + - Fixed test failure ``test_time_series_plot_color_with_empty_kwargs`` when + using custom matplotlib default colors (:issue:`4345`) + - Fix running of stata IO tests. Now uses temporary files to write (:issue:`4353`) diff --git a/pandas/tests/test_graphics.py b/pandas/tests/test_graphics.py index f017acce0419b..b1fbbc797f743 100644 --- a/pandas/tests/test_graphics.py +++ b/pandas/tests/test_graphics.py @@ -917,7 +917,10 @@ def test_time_series_plot_color_kwargs(self): self.assert_(line.get_color() == 'green') def test_time_series_plot_color_with_empty_kwargs(self): + import matplotlib as mpl import matplotlib.pyplot as plt + + def_colors = mpl.rcParams['axes.color_cycle'] plt.close('all') for i in range(3): @@ -925,7 +928,7 @@ def test_time_series_plot_color_with_empty_kwargs(self): periods=12)).plot() line_colors = [l.get_color() for l in ax.get_lines()] - self.assert_(line_colors == ['b', 'g', 'r']) + self.assertEqual(line_colors, def_colors[:3]) @slow def test_grouped_hist(self):