Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Add test for specified width and fix two minor doc issues
  • Loading branch information
mwaskom committed Oct 30, 2022
commit a78d150a273add86466816d8b4983c34bcf213fd
6 changes: 5 additions & 1 deletion doc/_docstrings/objects.Norm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
"cell_type": "code",
"execution_count": null,
"id": "0bfee8b6-1e3e-499d-96ae-735a5c230b32",
"metadata": {},
"metadata": {
"tags": [
"hide"
]
},
"outputs": [],
"source": [
"import seaborn.objects as so\n",
Expand Down
4 changes: 2 additions & 2 deletions seaborn/_core/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,8 @@ def scale(self, **scales: Scale) -> Plot:
- A list of values, implying a :class:`Nominal` scale (e.g. `["b", "r"]`)

For more explicit control, pass a scale spec object such as :class:`Continuous`
or :class:`Nominal`. Or use `None` to use an "identity" scale, which treats data
values as literally encoding visual properties.
or :class:`Nominal`. Or pass `None` to use an "identity" scale, which treats
data values as literally encoding visual properties.

Examples
--------
Expand Down
6 changes: 6 additions & 0 deletions tests/_core/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,12 @@ def test_two_grouping_variables(self, long_df):
long_df, m, data_vars, split_vars, split_cols, split_keys
)

def test_specified_width(self, long_df):

m = MockMark()
Plot(long_df, x="x", y="y").add(m, width="z").plot()
assert_array_almost_equal(m.passed_data[0]["width"], long_df["z"])

def test_facets_no_subgroups(self, long_df):

split_var = "col"
Expand Down