Giter Club home page Giter Club logo

Comments (7)

mwaskom avatar mwaskom commented on May 21, 2024

Uh oh, that sounds like a bug. Let me look into it.

from seaborn.

waltonjones avatar waltonjones commented on May 21, 2024

If you need sample data to replicate, please let me know. I am happy to
provide an IPython notebook and the data file, but I would rather not
put it up on Github just yet. :)

On 21 Nov 2013, at 12:08, Michael Waskom wrote:

Uh oh, that sounds like a bug. Let me look into it.


Reply to this email directly or view it on GitHub:
#14 (comment)

from seaborn.

mwaskom avatar mwaskom commented on May 21, 2024

Indeed, it looks like the boxes end up in the alphabetical order of the grouping variable, but the xlabel names end up in the order they appear in the Series. I have replicated it in this gist.

For the time being, you can specify the names as a parameter (demonstrated in the final cell of the example notebook).

Thanks for reporting this! I'll open a PR to fix it tonight.

from seaborn.

waltonjones avatar waltonjones commented on May 21, 2024

You are fast, my friend. Like lightning.

On 21 Nov 2013, at 12:19, Michael Waskom wrote:

Indeed, it looks like the boxes end up in the alphabetical order of
the grouping variable, but the xlabel names end up in the order they
appear in the Series. I have replicated it in this
gist
.

For the time being, you can specify the names as a parameter
(demonstrated in the final cell of the example notebook).

Thanks for reporting this! I'll open a PR to fix it tonight.


Reply to this email directly or view it on GitHub:
#14 (comment)

from seaborn.

mwaskom avatar mwaskom commented on May 21, 2024

Fixed in master!

from seaborn.

waltonjones avatar waltonjones commented on May 21, 2024

Shall I put in another feature request for the ability to easily specify the order of the boxplot?

from seaborn.

mwaskom avatar mwaskom commented on May 21, 2024

Sure, go ahead and open a separate issue for that. This fix reminded me that there is a lot of gross repeated code in the setup for boxplot and violin that should be abstracted out. I probably will add the ordering when I get to that, otherwise it will just add more messiness.

In the meantime, you could do (extending the gist example):

cols = ["b", "c", "a"]
data = df.x.groupby(df.g).values[cols]
sns.boxplot(data, names=cols)

as a workaround.

from seaborn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.