Skip to content

Commit

Permalink
📝 move whatsnew entry, reword docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Gorelli committed Jan 17, 2020
1 parent 87b297c commit 65597a0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 20 deletions.
1 change: 0 additions & 1 deletion doc/source/whatsnew/v1.0.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,6 @@ Plotting
- Bug in color validation incorrectly raising for non-color styles (:issue:`29122`).
- Allow :meth:`DataFrame.plot.scatter` to plot ``objects`` and ``datetime`` type data (:issue:`18755`, :issue:`30391`)
- Bug in :meth:`DataFrame.hist`, ``xrot=0`` does not work with ``by`` and subplots (:issue:`30288`).
- :func:`.plot` for line/bar now accepts color by dictonary (:issue:`8193`).

Groupby/resample/rolling
^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v1.1.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ I/O
Plotting
^^^^^^^^

-
- :func:`.plot` for line/bar now accepts color by dictonary (:issue:`8193`).
-

Groupby/resample/rolling
Expand Down
36 changes: 18 additions & 18 deletions pandas/plotting/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -865,20 +865,20 @@ def line(self, x=None, y=None, **kwargs):
Either the location or the label of the columns to be used.
By default, it will use the remaining DataFrame numeric columns.
color : str, int, array_like, or dict, optional
The color of each line for each row. Possible values are:
The color for each of the DataFrame's columns. Possible values are:
- A single color string referred to by name, RGB or RGBA code,
for instance 'red' or '#a98d19'.
- A sequence of color strings referred to by name, RGB or RGBA
code, which will be used for each line for each row recursively. For
instance ['green','yellow'] all lines for each row will be filled in green
or yellow, alternatively.
code, which will be used for each column recursively. For
instance ['green','yellow'] each column's line will be coloured in
green or yellow, alternatively.
- A dict of the form {column name : color}, so that each row's lines will be
- A dict of the form {column name : color}, so that each column will be
colored accordingly. For example, if your columns are called `a` and `b`,
then passing {'a': 'green', 'b': 'red'} will color the lines for column
`a` in green and lines for column `b` in red.
then passing {'a': 'green', 'b': 'red'} will color lines for column `a` in
green and lines for column `b` in red.
**kwargs
Keyword arguments to pass on to :meth:`DataFrame.plot`.
Expand Down Expand Up @@ -960,17 +960,17 @@ def bar(self, x=None, y=None, **kwargs):
Allows plotting of one column versus another. If not specified,
all numerical columns are used.
color : str, int, array_like, or dict, optional
The color of each bar for each row. Possible values are:
The color for each of the DataFrame's columns. Possible values are:
- A single color string referred to by name, RGB or RGBA code,
for instance 'red' or '#a98d19'.
- A sequence of color strings referred to by name, RGB or RGBA
code, which will be used for each bar for each row recursively. For
instance ['green','yellow'] all bars for each row will be filled in green
or yellow, alternatively.
code, which will be used for each column recursively. For
instance ['green','yellow'] each column's bar will be filled in
green or yellow, alternatively.
- A dict of the form {column name : color}, so that each row's bars will be
- A dict of the form {column name : color}, so that each column will be
colored accordingly. For example, if your columns are called `a` and `b`,
then passing {'a': 'green', 'b': 'red'} will color bars for column `a` in
green and bars for column `b` in red.
Expand Down Expand Up @@ -1025,7 +1025,7 @@ def bar(self, x=None, y=None, **kwargs):
>>> axes = df.plot.bar(rot=0, subplots=True)
>>> axes[1].legend(loc=2) # doctest: +SKIP
If we don't like the default colours, we can specify how we'd
If you don't like the default colours, you can specify how you'd
like each column to be colored.
.. plot::
Expand Down Expand Up @@ -1069,17 +1069,17 @@ def barh(self, x=None, y=None, **kwargs):
y : label or position, default All numeric columns in dataframe
Columns to be plotted from the DataFrame.
color : str, int, array_like, or dict, optional
The color of each bar for each row. Possible values are:
The color for each of the DataFrame's columns. Possible values are:
- A single color string referred to by name, RGB or RGBA code,
for instance 'red' or '#a98d19'.
- A sequence of color strings referred to by name, RGB or RGBA
code, which will be used for each bar for each row recursively. For
instance ['green','yellow'] all bars for each row will be filled in green
or yellow, alternatively.
code, which will be used for each column recursively. For
instance ['green','yellow'] each column's bar will be filled in
green or yellow, alternatively.
- A dict of the form {column name : color}, so that each row's bars will be
- A dict of the form {column name : color}, so that each column will be
colored accordingly. For example, if your columns are called `a` and `b`,
then passing {'a': 'green', 'b': 'red'} will color bars for column `a` in
green and bars for column `b` in red.
Expand Down

0 comments on commit 65597a0

Please sign in to comment.