Skip to content

Add lineplot function #1285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 76 commits into from
Nov 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
0799f5f
Begin developing lineplot
mwaskom Sep 8, 2017
0289ea6
Something of a workable approach to lineplot attributes
mwaskom Sep 10, 2017
498d1ec
Some progress on estimates/cis in lineplot
mwaskom Sep 10, 2017
9e1102a
Various small fixes to get a reasonable set of examples working
mwaskom Sep 15, 2017
cbd7b5f
Move parse_hue into its own function, lots of other stuff too...
mwaskom Sep 17, 2017
d4d740c
Slightly different default dashes
mwaskom Sep 17, 2017
8459b6e
More organization of attribute code
mwaskom Sep 18, 2017
0f15267
Better handling of null data
mwaskom Sep 27, 2017
94d0076
Add tests for basic plot input variable parsing
mwaskom Sep 30, 2017
c1a35f4
Add tests for lineplot categorical palette
mwaskom Oct 1, 2017
cff7363
Add order parameters and rename limit parameters
mwaskom Oct 7, 2017
1763b00
Improve hue parsing to include handling numeric hue data
mwaskom Oct 7, 2017
aafff19
Fix CI with nulls
mwaskom Oct 8, 2017
3ce3215
Allow specified colors with numeric hue type using list or dict
mwaskom Oct 8, 2017
f133034
Add test module for basic plots
mwaskom Oct 8, 2017
97edfe6
Compat with older pandas
mwaskom Oct 8, 2017
1e6c680
Don't raise on empty input
mwaskom Oct 8, 2017
c37ba38
Tweak default dashes
mwaskom Oct 12, 2017
efe6543
Add two TODOs
mwaskom Oct 22, 2017
888fc51
Add better handling and tests of size variable
mwaskom Oct 29, 2017
0281a90
Some style tests (but incomplete coverage)
mwaskom Oct 29, 2017
c443781
Simplify style specification check
mwaskom Oct 30, 2017
c26a237
Compat with older pandas
mwaskom Oct 30, 2017
98b5131
Try bumping minimal pinned versions
mwaskom Oct 30, 2017
3788034
Handle style_order
mwaskom Oct 30, 2017
24542c7
Don't use conda-forge
mwaskom Oct 30, 2017
c70ca88
Ignore new pyflakes warning about l as variable
mwaskom Oct 30, 2017
fddba73
Include libgfortran in pinned build
mwaskom Oct 31, 2017
342e002
Pandas compat and bump minimal pandas
mwaskom Oct 31, 2017
3debde1
Add axes labels
mwaskom Nov 2, 2017
efb5860
Add basic legend code
mwaskom Nov 5, 2017
def7f14
Renaming and reordering
mwaskom Nov 24, 2017
74982be
Change where semantic parsing and data subsetting happens
mwaskom Nov 24, 2017
dbfb10a
Change "dashes" for a solid line
mwaskom Nov 24, 2017
d8fbfb4
Add test for the number of subsets to plot
mwaskom Nov 24, 2017
7e8909d
More tests for subset data
mwaskom Nov 24, 2017
f2f2973
Reorganize methods
mwaskom Nov 24, 2017
23765d1
Reorder hue/size/style in more places
mwaskom Nov 24, 2017
5d27bef
Only add legend if we have legend data
mwaskom Nov 24, 2017
abb6d6f
Support named methods as estimators and 'sd' as ci
mwaskom Nov 24, 2017
646f768
Add aggregation tests
mwaskom Nov 24, 2017
67f42c0
Refactor guts out of parse_hue to generic functions
mwaskom Nov 25, 2017
32cc2eb
Refactor parse_style method in LinePlotter
mwaskom Nov 25, 2017
5f0c995
Allow non-numeric size argument in lineplot
mwaskom Nov 25, 2017
f082088
Extract labels for hue/size/style
mwaskom Nov 26, 2017
dbd8661
Change where sorting happens
mwaskom Nov 26, 2017
a88b821
Improve legending to handle multiple assignment of semantics
mwaskom Nov 26, 2017
ec92c44
Messy approach to brief legend for numeric variables
mwaskom Nov 26, 2017
97b4ac4
Don't cycle line colors internally
mwaskom Nov 26, 2017
67ab2bd
Add legend tests
mwaskom Nov 26, 2017
9ea3be2
Change how legend verbosity gets controlled
mwaskom Nov 26, 2017
525770b
Add plotting tests
mwaskom Nov 26, 2017
3cbedb3
Add wrapper layer for df.sort/df.sort_values
mwaskom Nov 26, 2017
6852715
Add axes label tests
mwaskom Nov 26, 2017
67c4ab6
Don't test on Python 3.4
mwaskom Nov 26, 2017
e6e53ea
Have categorical size mapping go from thick to thin
mwaskom Nov 26, 2017
96a11fa
Fix legendparameter not getting passed into plotter
mwaskom Nov 26, 2017
8a4b9f2
Ensure that brief legend can be drawn for numeric size with specified…
mwaskom Nov 26, 2017
6c0e323
Add lineplot parameter documentation
mwaskom Nov 26, 2017
ee63fea
Add API examples for lineplot
mwaskom Nov 27, 2017
fa507e1
Attempt to workarond pandas 0.21 datetime converter issue for doctests
mwaskom Nov 27, 2017
dd138c4
Close figure before plotting with date data
mwaskom Nov 27, 2017
a7a2c6b
Improved usage of pandas semantic info with wide-form data
mwaskom Nov 27, 2017
d1f60a8
Fix doctest
mwaskom Nov 27, 2017
015bcd2
Fix for older numpy
mwaskom Nov 27, 2017
2a967ff
Treat hue variable as categorical when palette is a list or dict
mwaskom Nov 27, 2017
63346b6
Don't sort keys in FacetGrid legend
mwaskom Nov 27, 2017
0a225dc
Round out lineplot docstring and add some code comments
mwaskom Nov 27, 2017
7ea7bad
Add new lineplot examples and remove old tsplot ones
mwaskom Nov 27, 2017
b9bb5fb
Update tsplot warning message
mwaskom Nov 27, 2017
5516ae5
Tweaks to a few examples
mwaskom Nov 29, 2017
9420611
Update bootstrap to use named numpy array method
mwaskom Nov 30, 2017
5574f51
Simplify lineplot bootstrap logic
mwaskom Nov 30, 2017
596d4ca
Add lineplot release notes
mwaskom Nov 30, 2017
685ca8b
Add tutorial notebook for new basic plots
mwaskom Nov 30, 2017
b882bf1
Improve lineplot example
mwaskom Nov 30, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ 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.4 DEPS=latest BACKEND=agg 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
Expand All @@ -25,9 +24,7 @@ before_install:


install:
- conda update conda
- conda create -n testenv pip python=$PYTHON
- conda update conda
- source activate testenv
- cat testing/deps_${DEPS}.txt testing/utils.txt > deps.txt
- conda install --file deps.txt
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ coverage:
pytest --doctest-modules --cov=seaborn --cov-config=.coveragerc seaborn

lint:
flake8 --exclude seaborn/__init__.py,seaborn/colors/__init__.py,seaborn/cm.py,seaborn/tests,seaborn/external seaborn
flake8 --ignore E121,E123,E126,E226,E24,E704,E741,W503,W504 --exclude seaborn/__init__.py,seaborn/colors/__init__.py,seaborn/cm.py,seaborn/tests,seaborn/external seaborn
1 change: 1 addition & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ generated/
examples/
example_thumbs/
aesthetics.rst
basic.rst
color_palettes.rst
distributions.rst
regression.rst
Expand Down
11 changes: 11 additions & 0 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ Axis grids
JointGrid
jointplot


.. _basic_api:

Basic plots
-----------

.. autosummary::
:toctree: generated

lineplot

.. _categorical_api:

Categorical plots
Expand Down
4 changes: 3 additions & 1 deletion doc/releases/v0.9.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
v0.9.0 (Unreleased)
-------------------

- Final removal of the previously-deprecated ``coefcplot`` and ``interactplot`` functions.
- Added the :func:`lineplot` function for representing relationships between numeric ``x`` and ``y`` variables with lines, potentially subsetting by up to three other variables and semantically mapping those subsets with the color, size, or style of the lines. This function replaces :func:`tsplot`, but with an API that is more consistent with other modern seaborn functions and has both more flexibility (more dimensions of semantic mapping, better handling of dates) and less flexibility (fewer options for visual representing uncertainty). There is considerable new API documentation and a new tutorial TODO.

- Final removal of the previously-deprecated ``coefplot`` and ``interactplot`` functions.

- Updated the testing infrastructure to execute tests with `pytest <https://docs.pytest.org/en/latest/>` (although many individual tests still use nose assertion).
1 change: 1 addition & 0 deletions doc/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Plotting functions
.. toctree::
:maxdepth: 2

tutorial/basic
tutorial/distributions
tutorial/categorical
tutorial/regression
Expand Down
1 change: 1 addition & 0 deletions doc/tutorial/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ notebooks:

tools/nb_to_doc.py aesthetics
tools/nb_to_doc.py color_palettes
tools/nb_to_doc.py basic
tools/nb_to_doc.py distributions
tools/nb_to_doc.py regression
tools/nb_to_doc.py categorical
Expand Down
102 changes: 29 additions & 73 deletions doc/tutorial/aesthetics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline"
Expand All @@ -39,9 +37,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
Expand All @@ -61,9 +57,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"def sinplot(flip=1):\n",
Expand All @@ -82,9 +76,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"sinplot()"
Expand All @@ -100,9 +92,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"sns.set()\n",
Expand Down Expand Up @@ -130,9 +120,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"sns.set_style(\"whitegrid\")\n",
Expand All @@ -150,9 +138,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"sns.set_style(\"dark\")"
Expand All @@ -161,9 +147,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"sinplot()"
Expand All @@ -172,9 +156,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"sns.set_style(\"white\")"
Expand All @@ -183,9 +165,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"sinplot()"
Expand All @@ -201,9 +181,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"sns.set_style(\"ticks\")\n",
Expand All @@ -225,9 +203,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"sinplot()\n",
Expand All @@ -244,9 +220,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"f, ax = plt.subplots()\n",
Expand All @@ -264,9 +238,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"sns.set_style(\"whitegrid\")\n",
Expand All @@ -287,9 +259,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"with sns.axes_style(\"darkgrid\"):\n",
Expand All @@ -314,9 +284,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"sns.axes_style()"
Expand All @@ -332,9 +300,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"sns.set_style(\"darkgrid\", {\"axes.facecolor\": \".9\"})\n",
Expand All @@ -358,9 +324,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"sns.set()"
Expand All @@ -376,9 +340,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"sns.set_context(\"paper\")\n",
Expand All @@ -388,9 +350,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"sns.set_context(\"talk\")\n",
Expand All @@ -400,9 +360,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"sns.set_context(\"poster\")\n",
Expand All @@ -423,9 +381,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"sns.set_context(\"notebook\", font_scale=1.5, rc={\"lines.linewidth\": 2.5})\n",
Expand All @@ -444,23 +400,23 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"display_name": "Python 3.6 (seaborn-dev)",
"language": "python",
"name": "python2"
"name": "seaborn-dev"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.12"
"pygments_lexer": "ipython3",
"version": "3.6.3"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
"nbformat_minor": 1
}
Loading