Skip to content

Commit

Permalink
Fix and modernize aspects of relational plot docs (#2200)
Browse files Browse the repository at this point in the history
* Fix relational colors test method

Fixes #2147

* Modernize relational doc inheritence

Fixes #2065, Fixes #2187

* Dedent relplot doc components

* Reorganize docs to emphasize distribution module
  • Loading branch information
mwaskom committed Aug 18, 2020
1 parent 991afb0 commit c517470
Show file tree
Hide file tree
Showing 7 changed files with 721 additions and 676 deletions.
30 changes: 15 additions & 15 deletions doc/api.rst
Expand Up @@ -17,6 +17,21 @@ Relational plots
scatterplot
lineplot

.. _distribution_api:

Distribution plots
------------------

.. autosummary::
:toctree: generated/

displot
histplot
kdeplot
ecdfplot
rugplot
distplot

.. _categorical_api:

Categorical plots
Expand All @@ -35,21 +50,6 @@ Categorical plots
barplot
countplot

.. _distribution_api:

Distribution plots
------------------

.. autosummary::
:toctree: generated/

displot
histplot
kdeplot
ecdfplot
rugplot
distplot

.. _regression_api:

Regression plots
Expand Down
2 changes: 1 addition & 1 deletion doc/index.rst
Expand Up @@ -113,8 +113,8 @@ To see the code or report a bug, please visit the `github repository
<div class="panel-body">

* Relational: :ref:`API <relational_api>` | :doc:`Tutorial <tutorial/relational>`
* Categorical: :ref:`API <categorical_api>` | :doc:`Tutorial <tutorial/categorical>`
* Distribution: :ref:`API <distribution_api>` | :doc:`Tutorial <tutorial/distributions>`
* Categorical: :ref:`API <categorical_api>` | :doc:`Tutorial <tutorial/categorical>`
* Regression: :ref:`API <regression_api>` | :doc:`Tutorial <tutorial/regression>`
* Multiples: :ref:`API <grid_api>` | :doc:`Tutorial <tutorial/axis_grids>`
* Style: :ref:`API <style_api>` | :doc:`Tutorial <tutorial/aesthetics>`
Expand Down
12 changes: 6 additions & 6 deletions doc/tutorial.rst
Expand Up @@ -42,7 +42,7 @@ Official seaborn tutorial
.. toctree::
:maxdepth: 2

tutorial/categorical
tutorial/distributions

.. raw:: html

Expand All @@ -51,16 +51,16 @@ Official seaborn tutorial
<hr>
<div class="row">
<div class="col-md-4">
<a href=./tutorial/distributions.html>
<img src="_images/distributions_81_0.png" class="img-responsive center-block">
<a href=./tutorial/regression.html>
<img src="_images/regression_37_0.png" class="img-responsive center-block">
</a>
</div>
<div class="col-md-8">

.. toctree::
:maxdepth: 2

tutorial/distributions
tutorial/categorical

.. raw:: html

Expand All @@ -69,8 +69,8 @@ Official seaborn tutorial
<hr>
<div class="row">
<div class="col-md-4">
<a href=./tutorial/regression.html>
<img src="_images/regression_37_0.png" class="img-responsive center-block">
<a href=./tutorial/distributions.html>
<img src="_images/distributions_81_0.png" class="img-responsive center-block">
</a>
</div>
<div class="col-md-8">
Expand Down
17 changes: 17 additions & 0 deletions seaborn/_docstrings.py
Expand Up @@ -115,6 +115,14 @@ def from_function_params(cls, func):

_seealso_blurbs = dict(

# Relational plots
scatterplot="""
scatterplot : Plot data using points.
""",
lineplot="""
lineplot : Plot data using lines.
""",

# Distribution plots
displot="""
displot : Figure-level interface to distribution plot functions.
Expand All @@ -133,9 +141,18 @@ def from_function_params(cls, func):
""",

# Categorical plots
stripplot="""
stripplot : Plot a categorical scatter with jitter.
""",
swarmplot="""
swarmplot : Plot a categorical scatter with non-overlapping points.
""",
violinplot="""
violinplot : Draw an enhanced boxplot using kernel density estimation.
""",
pointplot="""
pointplot : Plot point estimates and CIs using markers and lines.
""",

# Multiples
jointplot="""
Expand Down
9 changes: 5 additions & 4 deletions seaborn/axisgrid.py
Expand Up @@ -496,10 +496,11 @@ def __init__(
See Also
--------
PairGrid : Subplot grid for plotting pairwise relationships.
relplot : Combine a relational plot and a :class:`FacetGrid`.
catplot : Combine a categorical plot and a :class:`FacetGrid`.
lmplot : Combine a regression plot and a :class:`FacetGrid`.
PairGrid : Subplot grid for plotting pairwise relationships
relplot : Combine a relational plot and a :class:`FacetGrid`
displot : Combine a distribution plot and a :class:`FacetGrid`
catplot : Combine a categorical plot and a :class:`FacetGrid`
lmplot : Combine a regression plot and a :class:`FacetGrid`
Examples
--------
Expand Down

0 comments on commit c517470

Please sign in to comment.