Skip to content

Commit 2201be2

Browse files
authored
Merge branch 'master' into plot/layout_rect
2 parents 1207944 + 03d703b commit 2201be2

27 files changed

+286
-181
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ If you think you've encountered a bug in seaborn, please report it on the [Githu
1616
- A clear explanation of why you think something is wrong
1717
- The specific versions of seaborn and matplotlib that you are working with
1818

19-
Bug reports are easiest to address if they can be demonstrated using one of the example datasets from the seaborn docs (i.e. with `seaborn.load_dataset`). Otherwise, it is preferable that your example generate synthetic data to reproduce the problem. If you can only demonstrate the issue with your actual dataset, you will need to share it, ideally as a csv. Note that you can upload a csv directly to a github issue thread, but it must have a `.txt` suffix.
19+
Bug reports are easiest to address if they can be demonstrated using one of the example datasets from the seaborn docs (i.e. with `seaborn.load_dataset`). Otherwise, it is preferable that your example generate synthetic data to reproduce the problem. If you can only demonstrate the issue with your actual dataset, you will need to share it, ideally as a csv (do not share data as a pickle file).
2020

2121
If you've encountered an error, searching the specific text of the message before opening a new issue can often help you solve the problem quickly and avoid making a duplicate report.
2222

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ seaborn: statistical data visualization
66
=======================================
77

88
[![PyPI Version](https://img.shields.io/pypi/v/seaborn.svg)](https://pypi.org/project/seaborn/)
9-
[![License](https://img.shields.io/pypi/l/seaborn.svg)](https://github.com/mwaskom/seaborn/blob/master/LICENSE)
9+
[![License](https://img.shields.io/pypi/l/seaborn.svg)](https://github.com/mwaskom/seaborn/blob/master/LICENSE.md)
1010
[![DOI](https://joss.theoj.org/papers/10.21105/joss.03021/status.svg)](https://doi.org/10.21105/joss.03021)
1111
[![Tests](https://github.com/mwaskom/seaborn/workflows/CI/badge.svg)](https://github.com/mwaskom/seaborn/actions)
1212
[![Code Coverage](https://codecov.io/gh/mwaskom/seaborn/branch/master/graph/badge.svg)](https://codecov.io/gh/mwaskom/seaborn)

doc/_docstrings/barplot.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"id": "b53b65b8-5670-4905-aa39-36db04f4b813",
2323
"metadata": {},
2424
"source": [
25-
"With long data, assign `x` and `y` to group by a categorical varaible and plot aggregated values, with confidence intervals:"
25+
"With long data, assign `x` and `y` to group by a categorical variable and plot aggregated values, with confidence intervals:"
2626
]
2727
},
2828
{

doc/_docstrings/histplot.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@
312312
"cell_type": "markdown",
313313
"metadata": {},
314314
"source": [
315-
"Step functions, esepcially when unfilled, make it easy to compare cumulative histograms:"
315+
"Step functions, especially when unfilled, make it easy to compare cumulative histograms:"
316316
]
317317
},
318318
{

doc/_docstrings/objects.Est.ipynb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,30 @@
109109
"p.add(so.Range(), so.Est(seed=0))"
110110
]
111111
},
112+
{
113+
"cell_type": "markdown",
114+
"id": "df807ef8-b5fb-4eac-b539-1bd4e797ddc2",
115+
"metadata": {},
116+
"source": [
117+
"To compute a weighted estimate (and confidence interval), assign a `weight` variable in the layer where you use the stat:"
118+
]
119+
},
112120
{
113121
"cell_type": "code",
114122
"execution_count": null,
115123
"id": "5e4a0594-e1ee-4f72-971e-3763dd626e8b",
116124
"metadata": {},
117125
"outputs": [],
126+
"source": [
127+
"p.add(so.Range(), so.Est(), weight=\"price\")"
128+
]
129+
},
130+
{
131+
"cell_type": "code",
132+
"execution_count": null,
133+
"id": "0d0c34d7-fb76-44cf-9079-3ec7f45741d0",
134+
"metadata": {},
135+
"outputs": [],
118136
"source": []
119137
}
120138
],

doc/_docstrings/pointplot.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"id": "f25d3647-9fad-47b2-b49d-db6f5b5c3795",
2323
"metadata": {},
2424
"source": [
25-
"Group by a categorical varaible and plot aggregated values, with confidence intervals:"
25+
"Group by a categorical variable and plot aggregated values, with confidence intervals:"
2626
]
2727
},
2828
{
@@ -138,7 +138,7 @@
138138
"id": "00273ada-cd12-410a-a268-38243d6514ae",
139139
"metadata": {},
140140
"source": [
141-
"Dodge by a specific amount, relative to the width alloted for each level:"
141+
"Dodge by a specific amount, relative to the width allotted for each level:"
142142
]
143143
},
144144
{
@@ -164,7 +164,7 @@
164164
"id": "e205e7c8-6b11-44e6-b43f-7416c427215d",
165165
"metadata": {},
166166
"source": [
167-
"When variables are not explicity assigned and the dataset is two-dimensional, the plot will aggregate over each column:"
167+
"When variables are not explicitly assigned and the dataset is two-dimensional, the plot will aggregate over each column:"
168168
]
169169
},
170170
{

doc/_docstrings/scatterplot.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
"cell_type": "raw",
168168
"metadata": {},
169169
"source": [
170-
"Control the range of marker areas with ``sizes``, and set ``lengend=\"full\"`` to force every unique value to appear in the legend:"
170+
"Control the range of marker areas with ``sizes``, and set ``legend=\"full\"`` to force every unique value to appear in the legend:"
171171
]
172172
},
173173
{

doc/_tutorial/data_structure.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"As a data visualization library, seaborn requires that you provide it with data. This chapter explains the various ways to accomplish that task. Seaborn supports several different dataset formats, and most functions accept data represented with objects from the `pandas <https://pandas.pydata.org/>`_ or `numpy <https://numpy.org/>`_ libraries as well as built-in Python types like lists and dictionaries. Understanding the usage patterns associated with these different options will help you quickly create useful visualizations for nearly any dataset.\n",
2020
"\n",
2121
".. note::\n",
22-
" As of current writing (v0.13.0), the full breadth of options covered here are supported by most, but not all, of the functions in seaborn. Namely, a few older functinos (e.g., :func:`lmplot` and :func:`regplot`) anre more limited in what they accept."
22+
" As of current writing (v0.13.0), the full breadth of options covered here are supported by most, but not all, of the functions in seaborn. Namely, a few older functions (e.g., :func:`lmplot` and :func:`regplot`) are more limited in what they accept."
2323
]
2424
},
2525
{

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ requires-python = ">=3.8"
2626
dependencies = [
2727
"numpy>=1.20,!=1.24.0",
2828
"pandas>=1.2",
29-
"matplotlib>=3.3,!=3.6.1",
29+
"matplotlib>=3.4,!=3.6.1",
3030
]
3131

3232
[project.optional-dependencies]

seaborn/_base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,8 @@ def iter_data(
933933

934934
grouping_keys = []
935935
for var in grouping_vars:
936-
grouping_keys.append(levels.get(var, []))
936+
key = levels.get(var)
937+
grouping_keys.append([] if key is None else key)
937938

938939
iter_keys = itertools.product(*grouping_keys)
939940
if reverse:

0 commit comments

Comments
 (0)