From f0b48e891a1bb573b7a46cfc9936dcd35d7d4f24 Mon Sep 17 00:00:00 2001 From: Maoz Gelbart <13831112+MaozGelbart@users.noreply.github.com> Date: Thu, 25 Apr 2024 17:36:49 +0300 Subject: [PATCH] Fix docstrings (#3678) --- seaborn/categorical.py | 15 +++++++++++---- seaborn/regression.py | 12 +++++++++++- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/seaborn/categorical.py b/seaborn/categorical.py index a43c085ba2..f4bb7837c6 100644 --- a/seaborn/categorical.py +++ b/seaborn/categorical.py @@ -1838,7 +1838,7 @@ def violinplot( the data within each group. .. versionadded:: v0.13.0 - bw_adjust: float + bw_adjust : float Factor that scales the bandwidth to use more or less smoothing. .. versionadded:: v0.13.0 @@ -2028,17 +2028,17 @@ def boxenplot( {native_scale} {formatter} {legend} - box_kws: dict + box_kws : dict Keyword arguments for the box artists; passed to :class:`matplotlib.patches.Rectangle`. .. versionadded:: v0.12.0 - line_kws: dict + line_kws : dict Keyword arguments for the line denoting the median; passed to :meth:`matplotlib.axes.Axes.plot`. .. versionadded:: v0.12.0 - flier_kws: dict + flier_kws : dict Keyword arguments for the scatter denoting the outlier observations; passed to :meth:`matplotlib.axes.Axes.scatter`. @@ -2295,10 +2295,13 @@ def swarmplot( brightness is determined by the color palette used for the body of the points. {linewidth} + {hue_norm} {log_scale} {native_scale} {formatter} {legend} + warn_thresh : float + The proportion of points that must overlap to trigger a warning. {ax_in} kwargs : key, value mappings Other keyword arguments are passed through to @@ -2556,6 +2559,7 @@ def pointplot( {stat_api_params} {color} {palette} + {hue_norm} markers : string or list of strings Markers to use for each of the `hue` levels. linestyles : string or list of strings @@ -2711,6 +2715,7 @@ def countplot( {color} {palette} {saturation} + {fill} {hue_norm} stat : {{'count', 'percent', 'proportion', 'probability'}} Statistic to compute; when not `'count'`, bar heights will be normalized so that @@ -2719,6 +2724,7 @@ def countplot( .. versionadded:: v0.13.0 {width} {dodge} + {gap} {log_scale} {native_scale} {formatter} @@ -3185,6 +3191,7 @@ def catplot( {col_wrap} {height} {aspect} + {log_scale} {native_scale} {formatter} {orient} diff --git a/seaborn/regression.py b/seaborn/regression.py index 5e5503a422..b9a0c455c7 100644 --- a/seaborn/regression.py +++ b/seaborn/regression.py @@ -557,6 +557,10 @@ def lineplot(self, ax, kws): If ``True``, the regression line is bounded by the data limits. If ``False``, it extends to the ``x`` axis limits. """), + dropna=dedent("""\ + dropna : bool, optional + If ``True``, remove observations with missing data from the plot. + """), xy_jitter=dedent("""\ {x,y}_jitter : floats, optional Add uniform random noise of this size to either the ``x`` or ``y`` @@ -729,6 +733,11 @@ def update_datalim(data, x, y, ax, **kws): facet_kws : dict Dictionary of keyword arguments for :class:`FacetGrid`. + Returns + ------- + :class:`FacetGrid` + The :class:`FacetGrid` object with the plot on it for further tweaking. + See Also -------- regplot : Plot data and a conditional model fit. @@ -783,7 +792,7 @@ def regplot( Parameters ---------- - x, y: string, series, or vector array + x, y : string, series, or vector array Input variables. If strings, these should correspond with column names in ``data``. When pandas objects are used, axes will be labeled with the series name. @@ -804,6 +813,7 @@ def regplot( {logx} {xy_partial} {truncate} + {dropna} {xy_jitter} label : string Label to apply to either the scatterplot or regression line (if