Giter Club home page Giter Club logo

Comments (6)

thuiop avatar thuiop commented on June 14, 2024

Duplicate of #3015 I believe?

from seaborn.

mwaskom avatar mwaskom commented on June 14, 2024

Yeah the problem presents a little bit differently but I think it is the same underlying issue.

from seaborn.

tiamilani avatar tiamilani commented on June 14, 2024

from seaborn.

mwaskom avatar mwaskom commented on June 14, 2024

Actually sorry, I want to revise what I said here a bit.

First I didn't look at the linked issue closely enough — this did sound like a duplicate, but the more relevant issue is #3556 which is a bit different and more fundamental.

But on the other hand I'm not totally convinced that there's a well-defined "correct behavior" here since you actually are passing different datasets, and the default ordering rule is to use categories in the order that they are encountered in the data. Unless I am missing something, I think that the consistent seaborn behavior would be to assign different default orderings.

In any case, if not obvious, the existing way to force a specific ordering would be .scale(color=so.Nominal(order=...)). If trying that doesn't get you consistently-dodged plots, then there is a more serious issue.

from seaborn.

tiamilani avatar tiamilani commented on June 14, 2024

It's true that I'm passing a different dataset, but the reason is that I want to produce a boxplot using seaborn objects and (up to now) I didn't find a function/argument to plot only the outliers from the original dataset.

I also agree that the current behavior it's consistent: a new dataset is passed -> the groupby operation should be repeated and the categories should be placed in te order of appearance. But, may I ask if there is already a plan to provide dataset operations inside seaborn objects? or a BoxPlot object?

The use cases that I can imagine at the moment are the following ones:

  • Use the combination of Range and Dot to produce a boxplot
  • Plot a line with PolyFit and underneath points randomly sampled by the original dataset instead of all the points (in case of big datasets)

By the way, thanks for the reference to .scale(color=so.Nominal(order=...)) didn't know about it

from seaborn.

mwaskom avatar mwaskom commented on June 14, 2024

Yes I've thought about adding an Outliers stat and having a Sample stat would make sense too! I also would like to support making boxplots without having to manually combine a bunch of different marks and stats, although that requires some compromises on the library design (essentially a BoxPlot mark is going to push a lot of statistical operations into the "mark" concept and I want to make sure that isn't done capriciously).

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.