Giter VIP home page Giter VIP logo

Comments (4)

josesho avatar josesho commented on May 29, 2024

Hi @anekimken,

This is a great suggestion. It's something I've thought about before.

If I can frame it from a toolkit/intended purpose perspective: seaborn (and matplotlib) are positioned as omnibus all-purpose plotting libraries. Hence they have such features as you allude to: the ability to plot different Axes objects in the same Figure.

For the case of estimation graphics and dabest, two Axes objects are required: one to plot the rawdata as swarmplots, and one to chart the effect size and the bootstrap distribution. The easiest way to do this was to create a Figure object with two Axes (appropriately sized and aligned), and then returning this to the user.

Arbitrary specification of which Axes to plot on would work for Cumming plots, but I'm not so sure they might work for Gardner-Altman plots; the latter requires horizontal alignment of the 2 axes. (If you plot the effect size in a non-aligned axes, it more or less defeats the purpose of the Gardner-Altman design?)

I suppose with some work the API could be tweaked to something like:

f, axx = plt.subplots(nrows=2, ncols=2)

my_data = dabest.load(df, idx=("control", "test"))

my_data.mean_diff.plot(swarm_ax=axx[0], effsize_ax=axx[1]);

Happy to accept a PR if you have a prototype! Currently I'm not sure it is a development priority.

Thanks for listening!

from dabest-python.

anekimken avatar anekimken commented on May 29, 2024

Hi @josesho, I'll take a look at it.

What do you think about using an inset axes instead of two axes? Most of the demos only use colorbars, but it looks possible to make a plot instead. The api for accessing the two axes may need to change a bit, but probably not much.

from dabest-python.

josesho avatar josesho commented on May 29, 2024

Sounds possible; happy to see what you come up with! Let's review when you have a PR.

from dabest-python.

josesho avatar josesho commented on May 29, 2024

Thanks for PR #73; which very nicely addresses this. I'm currently cleaning it up and updating docstrings. Thanks!

from dabest-python.

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.