这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@mwaskom
Copy link
Owner

@mwaskom mwaskom commented Jun 2, 2022

This reverts a change introduced at the beginning of the categorical plot modernization process (#2429), where 1D wide data (internally called "flat" data, although I am starting to prefer "thin") was pivoted like in the relational plots, with the series index going to x and values going to y.

While this makes sense for functions that aggregate (barplot/pointplot), I don't think it make sense for the distributional functions, so this replaces the original behavior:

sns.swarmplot(tips["total_bill"], orient="h")

image

It adds the slight improvement that the categorical axis would previously have a "0" tick label, whereas now the tick is unlabeled, akin to when you pass the data directly to x or y.

@codecov
Copy link

codecov bot commented Jun 2, 2022

Codecov Report

Merging #2829 (a01af81) into master (dce3150) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #2829   +/-   ##
=======================================
  Coverage   98.05%   98.05%           
=======================================
  Files          68       68           
  Lines       22065    22066    +1     
=======================================
+ Hits        21636    21637    +1     
  Misses        429      429           
Impacted Files Coverage Δ
seaborn/categorical.py 98.33% <100.00%> (+<0.01%) ⬆️
seaborn/tests/test_categorical.py 99.77% <100.00%> (-0.01%) ⬇️

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 dce3150...a01af81. Read the comment docs.

@mwaskom mwaskom added this to the v0.12.0 milestone Jun 2, 2022
@mwaskom mwaskom merged commit e2cae52 into master Jun 2, 2022
@mwaskom mwaskom deleted the cat/thin_data branch June 2, 2022 13:12
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