Skip to content

Conversation

elmer-garduno
Copy link

Support per-category width on boxplot. As discused on #1668, this is done by passing an array of widths on the sns.boxplot(width) argument.

Please let me know if this makes sense. I can add further testing.

@codecov
Copy link

codecov bot commented Feb 15, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@71a807b). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1962   +/-   ##
=========================================
  Coverage          ?   95.16%           
=========================================
  Files             ?       12           
  Lines             ?     4468           
  Branches          ?        0           
=========================================
  Hits              ?     4252           
  Misses            ?      216           
  Partials          ?        0           
Impacted Files Coverage Δ
seaborn/algorithms.py 100.00% <0.00%> (ø)
seaborn/axisgrid.py 94.98% <0.00%> (ø)
seaborn/matrix.py 95.08% <0.00%> (ø)
seaborn/palettes.py 96.89% <0.00%> (ø)
seaborn/relational.py 99.49% <0.00%> (ø)
seaborn/distributions.py 84.86% <0.00%> (ø)
seaborn/utils.py 87.41% <0.00%> (ø)
seaborn/regression.py 96.17% <0.00%> (ø)
seaborn/categorical.py 96.37% <0.00%> (ø)
seaborn/__init__.py 100.00% <0.00%> (ø)
... and 2 more

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 71a807b...ae1888b. Read the comment docs.

@mwaskom
Copy link
Owner

mwaskom commented Feb 15, 2020

I think that if this were going to be supported, it would have to be similar to how that option works in violinplot.

@elmer-garduno
Copy link
Author

elmer-garduno commented Feb 15, 2020 via email

@elmer-garduno
Copy link
Author

elmer-garduno commented Feb 15, 2020 via email

@mwaskom
Copy link
Owner

mwaskom commented Mar 15, 2023

This is now obviated (without explicit effort to enable it) by #3294:

sns.boxplot(data=tips, x="day", y="total_bill", widths=[.2, .4, .6, .8])

It doesn't work with hue; enabling that would be rather difficult and I lean not worth it.

Thanks for your interest!

@mwaskom mwaskom closed this Mar 15, 2023
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.

2 participants