Skip to content

Compute spacing/width separately for unshared axes#3119

Merged
mwaskom merged 4 commits intomasterfrom
fix/unshared_spacing
Oct 30, 2022
Merged

Compute spacing/width separately for unshared axes#3119
mwaskom merged 4 commits intomasterfrom
fix/unshared_spacing

Conversation

@mwaskom
Copy link
Copy Markdown
Owner

@mwaskom mwaskom commented Oct 30, 2022

Motivating example (from #3112):

(
    sns.load_dataset("penguins")
    .melt(["species"], ["bill_depth_mm", "bill_length_mm"])
    .pipe(so.Plot, x="value", color="species")
    .facet("variable")
    .add(so.Bars(), so.Hist(common_bins=["col"]))
    .share(x=False)
)

Before:

After:

(This is a little artificial because you could just use Plot.pair here but there are other cases where you'd actually want faceting).

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 30, 2022

Codecov Report

Merging #3119 (f9a4c96) into master (021a20f) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3119   +/-   ##
=======================================
  Coverage   98.41%   98.41%           
=======================================
  Files          76       76           
  Lines       24056    24076   +20     
=======================================
+ Hits        23675    23695   +20     
  Misses        381      381           
Impacted Files Coverage Δ
seaborn/utils.py 95.46% <ø> (ø)
seaborn/_core/plot.py 99.33% <100.00%> (+<0.01%) ⬆️
tests/_core/test_plot.py 98.68% <100.00%> (+0.01%) ⬆️

@mwaskom mwaskom force-pushed the fix/unshared_spacing branch from 954c8bb to f9a4c96 Compare October 30, 2022 15:13
@mwaskom mwaskom merged commit 8dc5a9c into master Oct 30, 2022
@mwaskom mwaskom deleted the fix/unshared_spacing branch October 30, 2022 17:32
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.

1 participant