diff --git a/examples/different_scatter_variables.py b/examples/different_scatter_variables.py index 2e55b37057..10e8d564f9 100644 --- a/examples/different_scatter_variables.py +++ b/examples/different_scatter_variables.py @@ -9,7 +9,7 @@ import matplotlib.pyplot as plt sns.set(style="whitegrid") -# Load the example iris dataset +# Load the example diamonds dataset diamonds = sns.load_dataset("diamonds") # Draw a scatter plot while assigning point colors and sizes to different diff --git a/examples/distplot_options.py b/examples/distplot_options.py index f5adac4b4d..147c8e11bc 100644 --- a/examples/distplot_options.py +++ b/examples/distplot_options.py @@ -26,7 +26,7 @@ # Plot a filled kernel density estimate sns.distplot(d, hist=False, color="g", kde_kws={"shade": True}, ax=axes[1, 0]) -# Plot a historgram and kernel density estimate +# Plot a histogram and kernel density estimate sns.distplot(d, color="m", ax=axes[1, 1]) plt.setp(axes, yticks=[]) diff --git a/examples/heatmap_annotation.py b/examples/heatmap_annotation.py index 7512dd3cce..84a586ecf7 100644 --- a/examples/heatmap_annotation.py +++ b/examples/heatmap_annotation.py @@ -7,7 +7,7 @@ import seaborn as sns sns.set() -# Load the example flights dataset and conver to long-form +# Load the example flights dataset and convert to long-form flights_long = sns.load_dataset("flights") flights = flights_long.pivot("month", "year", "passengers") diff --git a/examples/logistic_regression.py b/examples/logistic_regression.py index 1fc98d0d13..de6aafae38 100644 --- a/examples/logistic_regression.py +++ b/examples/logistic_regression.py @@ -7,13 +7,13 @@ import seaborn as sns sns.set(style="darkgrid") -# Load the example titanic dataset +# Load the example Titanic dataset df = sns.load_dataset("titanic") # Make a custom palette with gendered colors pal = dict(male="#6495ED", female="#F08080") -# Show the survival proability as a function of age and sex +# Show the survival probability as a function of age and sex g = sns.lmplot(x="age", y="survived", col="sex", hue="sex", data=df, palette=pal, y_jitter=.02, logistic=True) g.set(xlim=(0, 80), ylim=(-.05, 1.05)) diff --git a/examples/many_pairwise_correlations.py b/examples/many_pairwise_correlations.py index e414e76d75..4d93f8ace7 100644 --- a/examples/many_pairwise_correlations.py +++ b/examples/many_pairwise_correlations.py @@ -21,8 +21,7 @@ corr = d.corr() # Generate a mask for the upper triangle -mask = np.zeros_like(corr, dtype=np.bool) -mask[np.triu_indices_from(mask)] = True +mask = np.triu(np.ones_like(corr, dtype=np.bool)) # Set up the matplotlib figure f, ax = plt.subplots(figsize=(11, 9)) diff --git a/examples/multiple_regression.py b/examples/multiple_regression.py index bd6adc774a..93c0f291ad 100644 --- a/examples/multiple_regression.py +++ b/examples/multiple_regression.py @@ -10,7 +10,7 @@ # Load the iris dataset iris = sns.load_dataset("iris") -# Plot sepal with as a function of sepal_length across days +# Plot sepal width as a function of sepal_length across days g = sns.lmplot(x="sepal_length", y="sepal_width", hue="species", truncate=True, height=5, data=iris) diff --git a/examples/scatterplot_sizes.py b/examples/scatterplot_sizes.py index 5c3e9dac5a..e2bb6444bf 100644 --- a/examples/scatterplot_sizes.py +++ b/examples/scatterplot_sizes.py @@ -9,7 +9,7 @@ import seaborn as sns sns.set() -# Load the example iris dataset +# Load the example planets dataset planets = sns.load_dataset("planets") cmap = sns.cubehelix_palette(rot=-.2, as_cmap=True) diff --git a/seaborn/axisgrid.py b/seaborn/axisgrid.py index ac652e5ef3..6caf66b38a 100644 --- a/seaborn/axisgrid.py +++ b/seaborn/axisgrid.py @@ -1668,7 +1668,7 @@ def __init__(self, x, y, data=None, height=6, ratio=5, space=.2, if size is not None: height = size msg = ("The `size` parameter has been renamed to `height`; " - "pleaes update your code.") + "please update your code.") warnings.warn(msg, UserWarning) # Set up the subplot grid @@ -2061,7 +2061,7 @@ def pairplot(data, hue=None, hue_order=None, palette=None, if size is not None: height = size msg = ("The `size` parameter has been renamed to `height`; " - "pleaes update your code.") + "please update your code.") warnings.warn(msg, UserWarning) if not isinstance(data, pd.DataFrame): diff --git a/seaborn/categorical.py b/seaborn/categorical.py index 448deae81b..ef3a7da1b2 100644 --- a/seaborn/categorical.py +++ b/seaborn/categorical.py @@ -3035,6 +3035,9 @@ def swarmplot(x=None, y=None, hue=None, data=None, order=None, hue_order=None, of the points. {linewidth} {ax_in} + kwargs : key, value mappings + Other keyword arguments are passed through to ``plt.scatter`` at draw + time. Returns ------- @@ -3667,7 +3670,7 @@ def factorplot(*args, **kwargs): if "size" in kwargs: kwargs["height"] = kwargs.pop("size") - msg = ("The `size` paramter has been renamed to `height`; " + msg = ("The `size` parameter has been renamed to `height`; " "please update your code.") warnings.warn(msg, UserWarning) @@ -3687,7 +3690,7 @@ def catplot(x=None, y=None, hue=None, data=None, row=None, col=None, # Handle deprecations if "size" in kwargs: height = kwargs.pop("size") - msg = ("The `size` paramter has been renamed to `height`; " + msg = ("The `size` parameter has been renamed to `height`; " "please update your code.") warnings.warn(msg, UserWarning) diff --git a/seaborn/distributions.py b/seaborn/distributions.py index fe93e928ea..ab80401c4e 100644 --- a/seaborn/distributions.py +++ b/seaborn/distributions.py @@ -81,9 +81,9 @@ def distplot(a, bins=None, hist=True, kde=True, rug=False, fit=None, Name for the support axis label. If None, will try to get it from a.namel if False, do not set a label. label : string, optional - Legend label for the relevent component of the plot + Legend label for the relevant component of the plot. ax : matplotlib axis, optional - if provided, plot on this axis + If provided, plot on this axis. Returns ------- @@ -288,8 +288,8 @@ def _univariate_kdeplot(data, shade, vertical, kernel, bw, gridsize, cut, msg = "Kernel other than `gau` requires statsmodels." warnings.warn(msg, UserWarning) if cumulative: - raise ImportError("Cumulative distributions are currently" - "only implemented in statsmodels." + raise ImportError("Cumulative distributions are currently " + "only implemented in statsmodels. " "Please install statsmodels.") x, y = _scipy_univariate_kde(data, bw, gridsize, cut, clip) diff --git a/seaborn/regression.py b/seaborn/regression.py index 1485eb8d7e..15cf48662b 100644 --- a/seaborn/regression.py +++ b/seaborn/regression.py @@ -541,7 +541,7 @@ def lmplot(x, y, data, hue=None, col=None, row=None, palette=None, # Handle deprecations if size is not None: height = size - msg = ("The `size` paramter has been renamed to `height`; " + msg = ("The `size` parameter has been renamed to `height`; " "please update your code.") warnings.warn(msg, UserWarning) @@ -819,7 +819,7 @@ def regplot(x, y, data=None, x_estimator=None, x_bins=None, x_ci="ci", {truncate} {xy_jitter} label : string - Label to apply to ether the scatterplot or regression line (if + Label to apply to either the scatterplot or regression line (if ``scatter`` is ``False``) for use in a legend. color : matplotlib color Color to apply to all plot elements; will be superseded by colors diff --git a/seaborn/relational.py b/seaborn/relational.py index ccfc257a26..111a4f7106 100644 --- a/seaborn/relational.py +++ b/seaborn/relational.py @@ -1136,7 +1136,7 @@ def lineplot(x=None, y=None, hue=None, size=None, style=None, data=None, err_style : "band" or "bars", optional Whether to draw the confidence intervals with translucent error bands or discrete error bars. - err_band : dict of keyword arguments + err_kws : dict of keyword arguments Additional paramters to control the aesthetics of the error bars. The kwargs are passed either to ``ax.fill_between`` or ``ax.errorbar``, depending on the ``err_style``.