Skip to content
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

Allow x=/y= to control paired scales and limits #3458

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

mwaskom
Copy link
Owner

@mwaskom mwaskom commented Sep 1, 2023

This PR enhances the behavior of Plot.scale and Plot.limit when using Plot.pair such that all paired axes can be configured in one step by passing setting just x or y. Currently, each x0, x1, ... must be defined. The common scale/limit is treated as a fallback, so specific variables can still be defined separately:

(
    so.Plot(planets, x="year")
    .pair(y=["orbital_period", "mass", "distance"])
    .scale(y="log", y1="sqrt")
    .add(so.Dots())
)

Closes #2910

@codecov
Copy link

codecov bot commented Sep 1, 2023

Codecov Report

Merging #3458 (3f81b67) into master (082486d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3458   +/-   ##
=======================================
  Coverage   98.33%   98.33%           
=======================================
  Files          75       75           
  Lines       24438    24449   +11     
=======================================
+ Hits        24030    24041   +11     
  Misses        408      408           
Files Changed Coverage Δ
seaborn/_core/plot.py 98.30% <100.00%> (+<0.01%) ⬆️
tests/_core/test_plot.py 98.82% <100.00%> (+<0.01%) ⬆️

@mwaskom mwaskom merged commit 74a8301 into master Sep 1, 2023
12 checks passed
@mwaskom mwaskom deleted the plot/control_all_pairs branch September 1, 2023 11:37
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.

Scale has no effect for Pair plots in next-gen interface
1 participant