diff --git a/doc/api.rst b/doc/api.rst index 6d8b2af768..0ef1ffcb94 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -7,8 +7,8 @@ API reference .. _basic_api: -Basic plots ------------ +Relational plots +---------------- .. autosummary:: :toctree: generated @@ -24,6 +24,7 @@ Categorical plots .. autosummary:: :toctree: generated/ + factorplot stripplot swarmplot boxplot @@ -41,6 +42,8 @@ Distribution plots .. autosummary:: :toctree: generated/ + jointplot + pairplot distplot kdeplot rugplot @@ -53,6 +56,7 @@ Regression plots .. autosummary:: :toctree: generated/ + lmplot regplot residplot @@ -76,12 +80,8 @@ Multi-plot grids :toctree: generated/ FacetGrid - factorplot - lmplot PairGrid - pairplot JointGrid - jointplot .. _style_api: diff --git a/doc/index.rst b/doc/index.rst index e73499512c..a752b25625 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -27,9 +27,9 @@ seaborn: statistical data visualization
-* Basic: :ref:`API ` | :ref:`Tutorial ` +* Relational: :ref:`API ` | :ref:`Tutorial ` * Categorical: :ref:`API ` | :ref:`Tutorial ` -* Distribution: :ref:`API ` | :ref:`Tutorial ` -* Regression: :ref:`API ` | :ref:`Tutorial ` -* Multi-plot: :ref:`API ` | :ref:`Tutorial ` +* Distributions: :ref:`API ` | :ref:`Tutorial ` +* Regressions: :ref:`API ` | :ref:`Tutorial ` +* Multiples: :ref:`API ` | :ref:`Tutorial ` * Style: :ref:`API ` | :ref:`Tutorial ` * Color: :ref:`API ` | :ref:`Tutorial ` diff --git a/examples/different_scatter_variables.py b/examples/different_scatter_variables.py index 256f6b435b..2e55b37057 100644 --- a/examples/different_scatter_variables.py +++ b/examples/different_scatter_variables.py @@ -2,20 +2,24 @@ Scatterplot with categorical and numerical semantics ==================================================== -_thumb: .55, .5 +_thumb: .45, .5 """ import seaborn as sns import matplotlib.pyplot as plt -sns.set(style="white", palette="muted") +sns.set(style="whitegrid") # Load the example iris dataset -iris = sns.load_dataset("iris") +diamonds = sns.load_dataset("diamonds") -# Draw a scatter plot while assigning point colors and sizes -# to different variables in the dataset +# Draw a scatter plot while assigning point colors and sizes to different +# variables in the dataset f, ax = plt.subplots(figsize=(6.5, 6.5)) -ax = sns.scatterplot(x="sepal_length", y="sepal_width", - hue="species", size="petal_width", - sizes=(50, 250), alpha=.75, - data=iris) +sns.despine(f, left=True, bottom=True) +clarity_ranking = ["I1", "SI2", "SI1", "VS2", "VS1", "VVS2", "VVS1", "IF"] +sns.scatterplot(x="carat", y="price", + hue="clarity", size="depth", + palette="ch:r=-.2,d=.3_r", + hue_order=clarity_ranking, + sizes=(1, 8), linewidth=0, + data=diamonds, ax=ax) diff --git a/examples/errorband_lineplots.py b/examples/errorband_lineplots.py index 52cc945a40..3656706abe 100644 --- a/examples/errorband_lineplots.py +++ b/examples/errorband_lineplots.py @@ -2,7 +2,7 @@ Timeseries plot with error bands ================================ -_thumb: .5, .45 +_thumb: .48, .45 """ import seaborn as sns diff --git a/examples/grouped_boxplot.py b/examples/grouped_boxplot.py index 4a7e9a481b..eb4fb604c6 100644 --- a/examples/grouped_boxplot.py +++ b/examples/grouped_boxplot.py @@ -2,13 +2,17 @@ Grouped boxplots ================ +_thumb: .66, .45 + """ import seaborn as sns -sns.set(style="ticks") +sns.set(style="ticks", palette="pastel") # Load the example tips dataset tips = sns.load_dataset("tips") -# Draw a nested boxplot to show bills by day and sex -sns.boxplot(x="day", y="total_bill", hue="sex", data=tips, palette="PRGn") +# Draw a nested boxplot to show bills by day and time +sns.boxplot(x="day", y="total_bill", + hue="smoker", palette=["m", "g"], + data=tips) sns.despine(offset=10, trim=True) diff --git a/examples/grouped_violinplots.py b/examples/grouped_violinplots.py index bb022df246..5c86172d7b 100644 --- a/examples/grouped_violinplots.py +++ b/examples/grouped_violinplots.py @@ -2,7 +2,7 @@ Grouped violinplots with split violins ====================================== -_thumb: .5, .47 +_thumb: .43, .47 """ import seaborn as sns sns.set(style="whitegrid", palette="pastel", color_codes=True) @@ -11,6 +11,8 @@ tips = sns.load_dataset("tips") # Draw a nested violinplot and split the violins for easier comparison -sns.violinplot(x="day", y="total_bill", hue="sex", data=tips, split=True, - inner="quart", palette={"Male": "b", "Female": "y"}) +sns.violinplot(x="day", y="total_bill", hue="smoker", + split=True, inner="quart", + palette={"Yes": "y", "No": "b"}, + data=tips) sns.despine(left=True) diff --git a/examples/paired_pointplots.py b/examples/paired_pointplots.py index 39b764369f..5bc3f376d0 100644 --- a/examples/paired_pointplots.py +++ b/examples/paired_pointplots.py @@ -15,6 +15,6 @@ size=5, aspect=.5) # Draw a seaborn pointplot onto each Axes -g.map(sns.pointplot, color=sns.xkcd_rgb["plum"]) +g.map(sns.pointplot, scale=1.3, errwidth=4, color="xkcd:plum") g.set(ylim=(0, 1)) sns.despine(fig=g.fig, left=True) diff --git a/examples/regression_marginals.py b/examples/regression_marginals.py index 9dc68eda96..285e124a95 100644 --- a/examples/regression_marginals.py +++ b/examples/regression_marginals.py @@ -2,7 +2,7 @@ Linear regression with marginal distributions ============================================= -_thumb: .5, .6 +_thumb: .65, .65 """ import seaborn as sns sns.set(style="darkgrid")