Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
martyatvtti committed Sep 23, 2019
2 parents 2d87e99 + 222d544 commit 4502481
Show file tree
Hide file tree
Showing 43 changed files with 662 additions and 396 deletions.
14 changes: 12 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
language: python


dist: xenial
services:
- xvfb


env:
- PYTHON=2.7 DEPS=latest BACKEND=agg DOCTESTS=true
- PYTHON=2.7 DEPS=pinned BACKEND=agg DOCTESTS=false
- PYTHON=2.7 DEPS=latest BACKEND=qtagg DOCTESTS=true
- PYTHON=3.5 DEPS=latest BACKEND=agg DOCTESTS=true
- PYTHON=3.6 DEPS=latest BACKEND=agg DOCTESTS=true
- PYTHON=3.6 DEPS=latest BACKEND=qtagg DOCTESTS=true
- PYTHON=3.6 DEPS=minimal BACKEND=agg DOCTESTS=false
- PYTHON=3.7 DEPS=latest BACKEND=agg DOCTESTS=true
- PYTHON=3.7 DEPS=latest BACKEND=qtagg DOCTESTS=true
- PYTHON=3.7 DEPS=minimal BACKEND=agg DOCTESTS=false


before_install:
Expand Down Expand Up @@ -38,6 +44,10 @@ before_script:
sh -e /etc/init.d/xvfb start;
sleep 3;
fi
# https://www.python.org/dev/peps/pep-0493/
- if [ $PYTHON == "2.7" ]; then
export PYTHONHTTPSVERIFY=0;
fi


script:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2012-2018, Michael L. Waskom
Copyright (c) 2012-2019, Michael L. Waskom
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@ seaborn: statistical data visualization
=======================================

<div class="row">
<a href=https://seaborn.pydata.org/examples/anscombes_quartet.html>
<img src="https://seaborn.pydata.org/_static/anscombes_quartet_thumb.png" height="135" width="135">

<a href=https://seaborn.pydata.org/examples/scatterplot_matrix.html>
<img src="https://seaborn.pydata.org/_static/scatterplot_matrix_thumb.png" height="135" width="135">
</a>

<a href=http://seaborn.pydata.org/examples/errorband_lineplots.html>
<img src="https://seaborn.pydata.org/_static/errorband_lineplots_thumb.png" height="135" width="135">
</a>

<a href=https://seaborn.pydata.org/examples/multiple_regression.html>
<img src="https://seaborn.pydata.org/_static/multiple_regression_thumb.png" height="135" width="135">
<a href=http://seaborn.pydata.org/examples/different_scatter_variables.html>
<img src="http://seaborn.pydata.org/_static/different_scatter_variables_thumb.png" height="135" width="135">
</a>

<a href=https://seaborn.pydata.org/examples/many_facets.html>
Expand All @@ -18,10 +23,6 @@ seaborn: statistical data visualization
<img src="https://seaborn.pydata.org/_static/structured_heatmap_thumb.png" height="135" width="135">
</a>

<a href=https://seaborn.pydata.org/examples/scatterplot_matrix.html>
<img src="https://seaborn.pydata.org/_static/scatterplot_matrix_thumb.png" height="135" width="135">
</a>

<a href=https://seaborn.pydata.org/examples/horizontal_boxplot.html>
<img src="https://seaborn.pydata.org/_static/horizontal_boxplot_thumb.png" height="135" width="135">
</a>
Expand All @@ -32,7 +33,7 @@ seaborn: statistical data visualization

[![PyPI Version](https://img.shields.io/pypi/v/seaborn.svg)](https://pypi.org/project/seaborn/)
[![License](https://img.shields.io/pypi/l/seaborn.svg)](https://github.com/mwaskom/seaborn/blob/master/LICENSE)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.883859.svg)](https://doi.org/10.5281/zenodo.883859)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1313201.svg)](https://doi.org/10.5281/zenodo.1313201)
[![Build Status](https://travis-ci.org/mwaskom/seaborn.svg?branch=master)](https://travis-ci.org/mwaskom/seaborn)
[![Code Coverage](https://codecov.io/gh/mwaskom/seaborn/branch/master/graph/badge.svg)](https://codecov.io/gh/mwaskom/seaborn)

Expand Down
42 changes: 40 additions & 2 deletions doc/_static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,45 @@ ul.dropdown-menu {
*[id]:before {
display: block;
content: " ";
margin-top: -75px;
height: 75px;
margin-top: -60px;
height: 60px;
visibility: hidden;
}

table {
/*Uncomment to center tables horizontally*/
/* margin-left: auto; */
/* margin-right: auto; */
border: none;
border-collapse: collapse;
border-spacing: 0;
font-size: 12px;
table-layout: fixed;
}

thead {
border-bottom: 1px solid;
vertical-align: bottom;
}

tr, th, td {
text-align: right;
vertical-align: middle;
padding: 0.5em 0.5em;
line-height: normal;
white-space: normal;
max-width: none;
border: none;
}

th {
font-weight: bold;
}

tbody tr:nth-child(odd) {
background: #f5f5f5;
}

tbody tr:hover {
background: rgba(66, 165, 245, 0.2);
}
4 changes: 2 additions & 2 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ Distribution plots
.. autosummary::
:toctree: generated/

jointplot
pairplot
distplot
kdeplot
rugplot
Expand Down Expand Up @@ -93,6 +91,7 @@ Pair grids
.. autosummary::
:toctree: generated/

pairplot
PairGrid
PairGrid.map
PairGrid.map_diag
Expand All @@ -106,6 +105,7 @@ Joint grids
.. autosummary::
:toctree: generated/

jointplot
JointGrid
JointGrid.plot
JointGrid.plot_joint
Expand Down
22 changes: 11 additions & 11 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ Seaborn is a Python data visualization library based on `matplotlib
attractive and informative statistical graphics.

For a brief introduction to the ideas behind the library, you can read the
:ref:`introductory notes <introduction>`. Visit the :ref:`installation page
:doc:`introductory notes <introduction>`. Visit the :doc:`installation page
<installing>` to see how you can download the package. You can browse the
:ref:`example gallery <example_gallery>` to see what you can do with seaborn,
and then check out the :ref:`tutorial <tutorial>` and :ref:`API reference
<api_ref>` to find out how.
:doc:`example gallery <examples/index>` to see what you can do with seaborn,
and then check out the :doc:`tutorial <tutorial>` and :doc:`API reference
<api>` to find out how.

To see the code or report a bug, please visit the `github repository
<https://github.com/mwaskom/seaborn>`_. General support issues are most at home on `stackoverflow <https://stackoverflow.com/>`_, where there is a seaborn tag.
Expand Down Expand Up @@ -112,13 +112,13 @@ To see the code or report a bug, please visit the `github repository
</div>
<div class="panel-body">

* Relational: :ref:`API <relational_api>` | :ref:`Tutorial <relational_tutorial>`
* Categorical: :ref:`API <categorical_api>` | :ref:`Tutorial <categorical_tutorial>`
* Distributions: :ref:`API <distribution_api>` | :ref:`Tutorial <distribution_tutorial>`
* Regressions: :ref:`API <regression_api>` | :ref:`Tutorial <regression_tutorial>`
* Multiples: :ref:`API <grid_api>` | :ref:`Tutorial <grid_tutorial>`
* Style: :ref:`API <style_api>` | :ref:`Tutorial <aesthetics_tutorial>`
* Color: :ref:`API <palette_api>` | :ref:`Tutorial <palette_tutorial>`
* Relational: :ref:`API <relational_api>` | :doc:`Tutorial <tutorial/relational>`
* Categorical: :ref:`API <categorical_api>` | :doc:`Tutorial <tutorial/categorical>`
* Distributions: :ref:`API <distribution_api>` | :doc:`Tutorial <tutorial/distributions>`
* Regressions: :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>`
* Color: :ref:`API <palette_api>` | :doc:`Tutorial <tutorial/color_palettes>`

.. raw:: html

Expand Down
10 changes: 5 additions & 5 deletions doc/introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
"Statistical estimation and error bars\n",
"-------------------------------------\n",
"\n",
"Often we are interested in the average value of one variable as a function of other variables. Many seaborn functions can automatically perform the statistical estimation that is neccesary to answer these questions:"
"Often we are interested in the average value of one variable as a function of other variables. Many seaborn functions can automatically perform the statistical estimation that is necessary to answer these questions:"
]
},
{
Expand All @@ -213,7 +213,7 @@
"source": [
"When statistical values are estimated, seaborn will use bootstrapping to compute confidence intervals and draw error bars representing the uncertainty of the estimate.\n",
"\n",
"Statistical estimation in seaborn goes beyond descriptive statisitics. For example, it is also possible to enhance a scatterplot to include a linear regression model (and its uncertainty) using :func:`lmplot`:"
"Statistical estimation in seaborn goes beyond descriptive statistics. For example, it is also possible to enhance a scatterplot to include a linear regression model (and its uncertainty) using :func:`lmplot`:"
]
},
{
Expand Down Expand Up @@ -316,7 +316,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"Controling the size of the figure-level functions works a little bit differently than it does for other matplotlib figures. Instead of setting the overall figure size, the figure-level functions are parameterized by the size of each facet. And instead of setting the height and width of each facet, you control the height and *aspect* ratio (ratio of width to height). This parameterization makes it easy to control the size of the graphic without thinking about exactly how many rows and columns it will have, although it can be a source of confusion:"
"Controlling the size of the figure-level functions works a little bit differently than it does for other matplotlib figures. Instead of setting the overall figure size, the figure-level functions are parameterized by the size of each facet. And instead of setting the height and width of each facet, you control the height and *aspect* ratio (ratio of width to height). This parameterization makes it easy to control the size of the graphic without thinking about exactly how many rows and columns it will have, although it can be a source of confusion:"
]
},
{
Expand Down Expand Up @@ -427,7 +427,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"In the case of :func:`relplot` and other figure-level functions, that means there are a few levels of indirection because :func:`relplot` passes its exta keyword arguments to the underlying seaborn axes-level function, which passes *its* extra keyword arguments to the underlying matplotlib function. So it might take some effort to find the right documentation for the parameters you'll need to use, but in principle an extremely high level of customization is possible.\n",
"In the case of :func:`relplot` and other figure-level functions, that means there are a few levels of indirection because :func:`relplot` passes its exta keyword arguments to the underlying seaborn axes-level function, which passes *its* extra keyword arguments to the underlying matplotlib function. So it might take some effort to find the right documentation for the parameters you'll need to use, but in principle an extremely detailed level of customization is possible.\n",
"\n",
"Some customization of figure-level functions can be accomplished through additional parameters that get passed to :class:`FacetGrid`, and you can use the methods on that object to control many other properties of the figure. For even more tweaking, you can access the matplotlib objects that the plot is drawn onto, which are stored as attributes:"
]
Expand Down Expand Up @@ -461,7 +461,7 @@
"Organizing datasets\n",
"-------------------\n",
"\n",
"As mentioned above, seaborn will be most powerful when your datasets have a particular organization. This format ia alternately called \"long-form\" or \"tidy\" data and is described in detail by Hadley Wickham in this `academic paper <http://vita.had.co.nz/papers/tidy-data.html>`_. The rules can be simply stated:\n",
"As mentioned above, seaborn will be most powerful when your datasets have a particular organization. This format is alternately called \"long-form\" or \"tidy\" data and is described in detail by Hadley Wickham in this `academic paper <http://vita.had.co.nz/papers/tidy-data.html>`_. The rules can be simply stated:\n",
"\n",
"1. Each variable is a column\n",
"2. Each observation is a row\n",
Expand Down
5 changes: 3 additions & 2 deletions doc/releases/v0.9.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
v0.9.0 (July 2018)
------------------

TODO add Zenodo badge
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1313201.svg
:target: https://doi.org/10.5281/zenodo.1313201

This is a major release with several substantial and long-desired new features. There are also updates/modifications to the themes and color palettes that give better consistency with matplotlib 2.0 and some notable API changes.

Expand All @@ -26,7 +27,7 @@ Updates to themes and palettes

Several changes have been made to the seaborn style themes, context scaling, and color palettes. In general the aim of these changes was to make the seaborn styles more consistent with the `style updates in matplotlib 2.0 <https://matplotlib.org/users/dflt_style_changes.html>`_ and to leverage some of the new style parameters for better implementation of some aspects of the seaborn styles. Here is a list of the changes:

- Reorganized and updated some :func:`axes_style`/:func:`plotting_context` parameters to take advantage of improvements in the matplotlib 2.0 update. The biggest change involves using several new parameterss in the "style" spec while moving parameters that used to implement the corresponding aesthetics to the "context" spec. For example, axes spines and ticks are now off instead of having their width/length zeroed out for the darkgrid style. That means the width/length of these elements can now be scaled in different contexts. The effect is a more cohesive appearance of the plots, especially in larger contexts. These changes include only minimal support for the 1.x matplotlib series. Users who are stuck on matplotlib 1.5 but wish to use seaborn styling may want to use the seaborn parameters that can be accessed through the `matplotlib stylesheet interface <https://matplotlib.org/users/style_sheets.html>`_.
- Reorganized and updated some :func:`axes_style`/:func:`plotting_context` parameters to take advantage of improvements in the matplotlib 2.0 update. The biggest change involves using several new parameters in the "style" spec while moving parameters that used to implement the corresponding aesthetics to the "context" spec. For example, axes spines and ticks are now off instead of having their width/length zeroed out for the darkgrid style. That means the width/length of these elements can now be scaled in different contexts. The effect is a more cohesive appearance of the plots, especially in larger contexts. These changes include only minimal support for the 1.x matplotlib series. Users who are stuck on matplotlib 1.5 but wish to use seaborn styling may want to use the seaborn parameters that can be accessed through the `matplotlib stylesheet interface <https://matplotlib.org/users/style_sheets.html>`_.

- Updated the seaborn palettes ("deep", "muted", "colorblind", etc.) to correspond with the new 10-color matplotlib default. The legacy palettes are now available at "deep6", "muted6", "colorblind6", etc. Additionally, a few individual colors were tweaked for better consistency, aesthetics, and accessibility.

Expand Down
29 changes: 29 additions & 0 deletions doc/releases/v0.9.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

v0.9.1 (Unreleased)
------------------

This is a minor release, comprising mostly bug fixes and compatibility with dependency updates.

- Added the ``corner`` option to :class:`PairGrid` and :func:`pairplot` to make a grid with only the lower triangle of bivariate axes.

- Generalized the idea of "diagonal" axes in :class:`PairGrid` to any axes that share an x and y variable.

- In :class:`PairGrid`, the ``hue`` variable is now excluded from the default list of variables that make up the rows and columns of the grid.

- Fixed the behavior of ``dropna`` in :class:`PairGrid` to properly exclude null datapoints from each plot when set to ``True``.

- Exposed the ``layout_pad`` parameter in :class:`PairGrid` and set a smaller default than what matptlotlib sets for more efficient use of space in dense grids.

- Avoided an error when singular data is passed to :func:`kdeplot`, issuing a warning instead. This makes :func:`pairplot` more robust.

- Fixed an issue where :func:`regplot` could interfere with other axes in a multi-plot matplotlib figure.

- Semantic variables with a ``category`` data type will always be treated as categorical in relational plots.

- Avoided a warning about color specifications that arose from :func:`boxenplot` on newer matplotlibs.

- Fixed a bug when setting the rotation of x tick labels on a :class:`FacetGrid`.

- Fixed a bug when passing a ``norm`` object and using color annotations in :func:`clustermap`.

- Fixed a bug when trying to call :func:`set` while specifying a list of colors for the palette.
2 changes: 1 addition & 1 deletion doc/tutorial/axis_grids.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"cell_type": "raw",
"metadata": {},
"source": [
"When exploring medium-dimensional data, a useful approach is to draw multiple instances of the same plot on different subsets of your dataset. This technique is sometimes called either \"lattice\", or \"trellis\" plotting, and it is related to the idea of `\"small multiples\" <https://en.wikipedia.org/wiki/Small_multiple>`_. It allows a viewer to quickly extract a large amount of information about complex data. Matplotlib offers good support for making figures with multiple axes; seaborn builds on top of this to directly link the structure of the plot to the structure of your dataset.\n",
"When exploring medium-dimensional data, a useful approach is to draw multiple instances of the same plot on different subsets of your dataset. This technique is sometimes called either \"lattice\" or \"trellis\" plotting, and it is related to the idea of `\"small multiples\" <https://en.wikipedia.org/wiki/Small_multiple>`_. It allows a viewer to quickly extract a large amount of information about complex data. Matplotlib offers good support for making figures with multiple axes; seaborn builds on top of this to directly link the structure of the plot to the structure of your dataset.\n",
"\n",
"To use these features, your data has to be in a Pandas DataFrame and it must take the form of what Hadley Whickam calls `\"tidy\" data <https://vita.had.co.nz/papers/tidy-data.pdf>`_. In brief, that means your dataframe should be structured such that each column is a variable and each row is an observation.\n",
"\n",
Expand Down
Loading

0 comments on commit 4502481

Please sign in to comment.