Skip to content

Conversation

mwaskom
Copy link
Owner

@mwaskom mwaskom commented May 6, 2021

This PR rolls together a couple small fixes to semi-related issues in lmplot.

Fixes sticky edges on regression line with truncate=True

I don't actually think there's an issue about this, but it's ugly and not intentional:

Old:

image

New:

image

Fixes sharey with very different scales

This improves the code that scales the x axis to the data limits before plotting so that it does not interfere with sharey=False (fixes #2509)

Using the example case from that issue:

image

Adds facet_kws to lmplot and deprecate a couple params from the signature

Fixes #2518.

Additionally, sharex/sharey/legend_out have been deprecated from the lmplot signature, but they can now be passed using this parameter dictionary.

@mwaskom mwaskom added this to the v0.12.0 milestone May 6, 2021
@codecov
Copy link

codecov bot commented May 6, 2021

Codecov Report

Merging #2576 (84152e7) into master (4f79753) will increase coverage by 0.19%.
The diff coverage is 100.00%.

❗ Current head 84152e7 differs from pull request most recent head 72236f9. Consider uploading reports for the commit 72236f9 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2576      +/-   ##
==========================================
+ Coverage   97.27%   97.46%   +0.19%     
==========================================
  Files          17       17              
  Lines        6340     6354      +14     
==========================================
+ Hits         6167     6193      +26     
+ Misses        173      161      -12     
Impacted Files Coverage Δ
seaborn/rcmod.py 100.00% <ø> (ø)
seaborn/matrix.py 95.87% <100.00%> (+<0.01%) ⬆️
seaborn/regression.py 97.88% <100.00%> (+0.71%) ⬆️
seaborn/categorical.py 98.54% <0.00%> (+0.14%) ⬆️
seaborn/distributions.py 96.37% <0.00%> (+0.32%) ⬆️
seaborn/_docstrings.py 100.00% <0.00%> (+12.50%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 430c1bf...72236f9. Read the comment docs.

@mwaskom mwaskom merged commit 3750373 into master May 6, 2021
@mwaskom mwaskom deleted the fix_lmplot_scaling branch May 6, 2021 21:26
@mwaskom mwaskom modified the milestones: v0.12.0, v0.11.2 Aug 6, 2021
mwaskom added a commit that referenced this pull request Aug 6, 2021
* Only set sticky edges on regression line when not truncating

* Improve how datalimits are established for non-truncated lines

Fixes #2509

* Add facet_kws to lmplot

Closes #2518

* Update release notes

* Skip test that fails because of matplotlib bug

xref matplotlib/matplotlib#15967

* Always set datalims using float data

* Deprecate sharex/sharey/legend_out from lmplot signature

* Tweak release note [skip ci]

(cherry picked from commit 3750373)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow xlim as parameter for lmplot lmplot(sharey=False) not working

1 participant