diff --git a/README.md b/README.md index dfe3240246..5986c7ab16 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ The docs include a [tutorial](https://seaborn.pydata.org/tutorial.html), [exampl Dependencies ------------ -Seaborn supports Python 2.7 and 3.4+. +Seaborn supports Python 2.7 and 3.5+. Installation requires [numpy](http://www.numpy.org/), [scipy](https://www.scipy.org/), [pandas](https://pandas.pydata.org/), and [matplotlib](https://matplotlib.org/). Some functions will optionally use [statsmodels](https://www.statsmodels.org/) if it is installed. diff --git a/doc/.gitignore b/doc/.gitignore index efe960d466..0235922db3 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -3,6 +3,7 @@ _build/ generated/ examples/ example_thumbs/ +introduction.rst aesthetics.rst basic.rst color_palettes.rst diff --git a/doc/Makefile b/doc/Makefile index e10872b0df..9a5de4aa74 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -20,7 +20,7 @@ help: @echo "Please use \`make ' where is one of" @echo " clean to remove genrated output" @echo " html to make standalone HTML files" - @echo " notebooks to make the Jupyter notebook-based tutorials" + @echo " notebooks to make the Jupyter notebook-based tutorials" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @@ -48,9 +48,13 @@ clean: -rm -rf tutorial/*.rst -rm -rf generated/* -notebooks: +tutorials: + make -C tutorial - make -C tutorial notebooks +introduction: introduction.ipynb + tools/nb_to_doc.py introduction + +notebooks: tutorials introduction html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html diff --git a/doc/_static/style.css b/doc/_static/style.css index f64910e5c6..68e3d3a567 100644 --- a/doc/_static/style.css +++ b/doc/_static/style.css @@ -25,20 +25,46 @@ blockquote { margin: 0 0 0px !important; } +pre { + background-color: #f6f6f9 !important; +} + code { color: #49759c !important; background-color: #ffffff !important; } +code.descclassname { + padding-right: 0px !important; +} + +code.descname { + padding-left: 0px !important; +} + +dt:target, span.highlighted { + background-color: #ffffff !important; +} + +ul { + padding-left: 20px !important; +} + +ul.dropdown-menu { + padding-left: 0px !important; +} + .alert-info { background-color: #adb8cb !important; border-color: #adb8cb !important; color: #2c3e50 !important; } -.function dt { - padding-top: 150px; - margin-top: -150px; - -webkit-background-clip: content-box; - background-clip: content-box; +/* From https://github.com/twbs/bootstrap/issues/1768 */ +*[id]:before { + display: block; + content: " "; + margin-top: -75px; + height: 75px; + visibility: hidden; } diff --git a/doc/_templates/autosummary/base.rst b/doc/_templates/autosummary/base.rst new file mode 100644 index 0000000000..97e06c6f4a --- /dev/null +++ b/doc/_templates/autosummary/base.rst @@ -0,0 +1,11 @@ +.. raw:: html + + +
+ +{{ fullname | escape | underline}} + +.. currentmodule:: {{ module }} + +.. auto{{ objtype }}:: {{ objname }} + diff --git a/doc/_templates/autosummary/class.rst b/doc/_templates/autosummary/class.rst new file mode 100644 index 0000000000..f61852130c --- /dev/null +++ b/doc/_templates/autosummary/class.rst @@ -0,0 +1,34 @@ +.. raw:: html + +
+
+ +{{ fullname | escape | underline}} + +.. currentmodule:: {{ module }} + +.. autoclass:: {{ objname }} + + {% block methods %} + .. automethod:: __init__ + + {% if methods %} + .. rubric:: Methods + + .. autosummary:: + {% for item in methods %} + ~{{ name }}.{{ item }} + {%- endfor %} + {% endif %} + {% endblock %} + + {% block attributes %} + {% if attributes %} + .. rubric:: Attributes + + .. autosummary:: + {% for item in attributes %} + ~{{ name }}.{{ item }} + {%- endfor %} + {% endif %} + {% endblock %} diff --git a/doc/api.rst b/doc/api.rst index 14eaf33d7e..b347d4057e 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -5,27 +5,10 @@ API reference ============= -.. _grid_api: - -Axis grids ----------- - -.. autosummary:: - :toctree: generated/ - - FacetGrid - factorplot - lmplot - PairGrid - pairplot - JointGrid - jointplot - - .. _basic_api: -Basic plots ------------ +Relational plots +---------------- .. autosummary:: :toctree: generated @@ -42,6 +25,7 @@ Categorical plots .. autosummary:: :toctree: generated/ + factorplot stripplot swarmplot boxplot @@ -59,6 +43,8 @@ Distribution plots .. autosummary:: :toctree: generated/ + jointplot + pairplot distplot kdeplot rugplot @@ -71,6 +57,7 @@ Regression plots .. autosummary:: :toctree: generated/ + lmplot regplot residplot @@ -85,26 +72,49 @@ Matrix plots heatmap clustermap -Timeseries plots +.. _grid_api: + +Multi-plot grids ---------------- +Facet grids +~~~~~~~~~~~ + .. autosummary:: - :toctree: generated/ + :toctree: generated/ - tsplot + FacetGrid + FacetGrid.map + FacetGrid.map_dataframe -Miscellaneous plots -------------------- +Pair grids +~~~~~~~~~~ .. autosummary:: - :toctree: generated/ + :toctree: generated/ + + PairGrid + PairGrid.map + PairGrid.map_diag + PairGrid.map_offdiag + PairGrid.map_lower + PairGrid.map_upper - palplot +Joint grids +~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + JointGrid + JointGrid.plot + JointGrid.plot_joint + JointGrid.plot_marginals .. _style_api: -Style frontend --------------- +Style control +------------- .. autosummary:: :toctree: generated/ @@ -158,6 +168,7 @@ Utility functions .. autosummary:: :toctree: generated/ + load_dataset despine desaturate saturate diff --git a/doc/conf.py b/doc/conf.py index c7cf2dcd47..ef3ad76d93 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -35,6 +35,7 @@ 'sphinx.ext.coverage', 'sphinx.ext.mathjax', 'sphinx.ext.autosummary', + 'sphinx.ext.intersphinx', 'matplotlib.sphinxext.plot_directive', 'gallery_generator', 'numpydoc', @@ -283,3 +284,12 @@ def setup(app): app.add_javascript('copybutton.js') app.add_stylesheet('style.css') + + +# -- Intersphinx ------------------------------------------------ + +intersphinx_mapping = {'numpy': ('http://docs.scipy.org/doc/numpy/', None), + 'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None), + 'matplotlib': ('http://matplotlib.org/', None), + 'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None), + 'statsmodels': ('http://www.statsmodels.org/stable/', None)} \ No newline at end of file diff --git a/doc/index.rst b/doc/index.rst index f230b1609d..fd6ccfdd1e 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -24,38 +24,37 @@ seaborn: statistical data visualization .. raw:: html -