Skip to content

Make 'units' in lineplot functional #1433

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 5 commits into from
May 19, 2018
Merged

Make 'units' in lineplot functional #1433

merged 5 commits into from
May 19, 2018

Conversation

mwaskom
Copy link
Owner

@mwaskom mwaskom commented May 14, 2018

This PR adds some missing functionality from #1285. It makes the unit parameter functional for drawing replicate lines with the same semantics:

fmri = sns.load_dataset("fmri").query("region == 'parietal'")
ax = sns.lineplot(x="timepoint", y="signal", hue="event", units="subject",
                  estimator=None, linewidth=1, data=fmri)

image

This overloads the "units" parameter that is used elsewhere to do a hierarchical bootstrap. The hierarchical bootstrap is not currently implemented in lineplot. I think this makes sense because the parameter picks out the same dataset element in both cases. For the time being we're going to force specification of estimator=None when using units.

TODO

  • Raise when we have units and estimator
  • Tests
  • API example

@codecov
Copy link

codecov bot commented May 14, 2018

Codecov Report

Merging #1433 into master will decrease coverage by 0.01%.
The diff coverage is 93.93%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1433      +/-   ##
==========================================
- Coverage   94.19%   94.17%   -0.02%     
==========================================
  Files          15       15              
  Lines        4220     4240      +20     
==========================================
+ Hits         3975     3993      +18     
- Misses        245      247       +2
Impacted Files Coverage Δ
seaborn/basic.py 97.78% <93.93%> (-0.41%) ⬇️

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 c5be9bc...4ceb48e. Read the comment docs.

@mwaskom mwaskom merged commit 38c9b3e into master May 19, 2018
@mwaskom mwaskom deleted the lineplot_units branch May 19, 2018 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant