From a402b1c7c494de34d3ee5f03f40afbd5d111baa1 Mon Sep 17 00:00:00 2001 From: loudlemon Date: Thu, 16 Apr 2020 23:14:26 +0300 Subject: [PATCH 1/3] Update _core.py added missing parameters: - ax - subplots - sharex - sharey - secondary_y - sort_columns - stacked --- pandas/plotting/_core.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index e466a215091ea..76f92ba6eae25 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -606,8 +606,22 @@ class PlotAccessor(PandasObject): - 'pie' : pie plot - 'scatter' : scatter plot - 'hexbin' : hexbin plot. - + + ax : matplotlib axes object, default None + An axes of the current figure. + subplots : bool, default False + Make separate subplots for each column. + sharex : bool, default True if ax is None else False + In case subplots=True, share x axis and set some x axis labels + to invisible; defaults to True if ax is None otherwise False if + an ax is passed in; Be aware, that passing in both an ax and + sharex=True will alter all x axis labels for all axis in a figure. + sharey : bool, default False + In case aubplots=True, share y axis and set some y axis labels to invisible. + layout : tuple (optional) + (rows, columns) for the layout of subplots. figsize : a tuple (width, height) in inches + Size of a figure object. use_index : bool, default True Use index as ticks for x axis. title : str or list @@ -637,7 +651,9 @@ class PlotAccessor(PandasObject): yticks : sequence Values to use for the yticks. xlim : 2-tuple/list + Set the x limits of the current axes. ylim : 2-tuple/list + Set the y limits of the current axes. rot : int, default None Rotation for ticks (xticks for vertical, yticks for horizontal plots). @@ -663,6 +679,13 @@ class PlotAccessor(PandasObject): detail. xerr : DataFrame, Series, array-like, dict and str Equivalent to yerr. + stacked : bool, default False in line and bar plots, and True in area plot + If True, create stacked plot. + sort_columns : bool, default False + Sort columns names to determine plot ordering. + secondary_y : bool or sequence, default False + Whether to plot on the secondary y-axis if a list/tuple, which + columns to plot on secondary y-axis. mark_right : bool, default True When using a secondary_y axis, automatically mark the column labels with "(right)" in the legend. From e2f13f5256be68d1d1a245ad1c262065ad212982 Mon Sep 17 00:00:00 2001 From: loudlemon Date: Thu, 16 Apr 2020 23:20:06 +0300 Subject: [PATCH 2/3] Update _core.py --- pandas/plotting/_core.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index 76f92ba6eae25..3550a56f72975 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -606,15 +606,14 @@ class PlotAccessor(PandasObject): - 'pie' : pie plot - 'scatter' : scatter plot - 'hexbin' : hexbin plot. - ax : matplotlib axes object, default None An axes of the current figure. subplots : bool, default False Make separate subplots for each column. sharex : bool, default True if ax is None else False In case subplots=True, share x axis and set some x axis labels - to invisible; defaults to True if ax is None otherwise False if - an ax is passed in; Be aware, that passing in both an ax and + to invisible; defaults to True if ax is None otherwise False if + an ax is passed in; Be aware, that passing in both an ax and sharex=True will alter all x axis labels for all axis in a figure. sharey : bool, default False In case aubplots=True, share y axis and set some y axis labels to invisible. From 423a516aa7cdcaac7d893b09b8b0f8ca3fff193b Mon Sep 17 00:00:00 2001 From: loudlemon Date: Sun, 3 May 2020 06:41:51 +0300 Subject: [PATCH 3/3] update plot accessor docstring - quote 'param=value` cases - fix a few typos --- pandas/plotting/_core.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index 3550a56f72975..efa69c9b7d854 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -611,13 +611,13 @@ class PlotAccessor(PandasObject): subplots : bool, default False Make separate subplots for each column. sharex : bool, default True if ax is None else False - In case subplots=True, share x axis and set some x axis labels + In case ``subplots=True``, share x axis and set some x axis labels to invisible; defaults to True if ax is None otherwise False if an ax is passed in; Be aware, that passing in both an ax and - sharex=True will alter all x axis labels for all axis in a figure. + ``sharex=True`` will alter all x axis labels for all axis in a figure. sharey : bool, default False - In case aubplots=True, share y axis and set some y axis labels to invisible. - layout : tuple (optional) + In case ``subplots=True``, share y axis and set some y axis labels to invisible. + layout : tuple, optional (rows, columns) for the layout of subplots. figsize : a tuple (width, height) in inches Size of a figure object. @@ -681,7 +681,7 @@ class PlotAccessor(PandasObject): stacked : bool, default False in line and bar plots, and True in area plot If True, create stacked plot. sort_columns : bool, default False - Sort columns names to determine plot ordering. + Sort column names to determine plot ordering. secondary_y : bool or sequence, default False Whether to plot on the secondary y-axis if a list/tuple, which columns to plot on secondary y-axis.