Skip to content
Prev Previous commit
Next Next commit
Move whatsnew and add more test
  • Loading branch information
wuhaochen committed Aug 14, 2018
commit 337bdea0770dbde1881f0d049b9abc3689214bb8
1 change: 0 additions & 1 deletion doc/source/whatsnew/v0.23.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,6 @@ Plotting
- Bug in formatting tick labels with ``datetime.time()`` and fractional seconds (:issue:`18478`).
- :meth:`Series.plot.kde` has exposed the args ``ind`` and ``bw_method`` in the docstring (:issue:`18461`). The argument ``ind`` may now also be an integer (number of sample points).
- :func:`DataFrame.plot` now supports multiple columns to the ``y`` argument (:issue:`19699`)
- Bug in providing color array as color for a single plot (:issue:`20726`)


Groupby/Resample/Rolling
Expand Down
2 changes: 2 additions & 0 deletions doc/source/whatsnew/v0.24.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,8 @@ Plotting

- Bug in :func:`DataFrame.plot.scatter` and :func:`DataFrame.plot.hexbin` caused x-axis label and ticklabels to disappear when colorbar was on in IPython inline backend (:issue:`10611`, :issue:`10678`, and :issue:`20455`)
- Bug in plotting a Series with datetimes using :func:`matplotlib.axes.Axes.scatter` (:issue:`22039`)
- Bug in validating color parameter caused extra color to be appended to the given color array. This happened to multiple plotting functions that plotting with matplotlib. (:issue:`20726`)


Groupby/Resample/Rolling
^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
12 changes: 12 additions & 0 deletions pandas/tests/plotting/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,3 +323,15 @@ def test_get_standard_colors_no_appending(self):
color_before = cm.gnuplot(range(5))
color_after = _get_standard_colors(1, color=color_before)
assert len(color_after) == len(color_before)

# Original bug report example.
import numpy as np
import pandas as pd

df = pd.DataFrame(np.abs(np.random.randn(48, 4)),
columns=list("ABCD"))

color_list = cm.gnuplot(np.linspace(0, 1, 16))
p = df.A.plot.bar(figsize=(16, 7), color=color_list)
assert (p.patches[1].get_facecolor()
== p.patches[17].get_facecolor())