Comments (4)
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.
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.
Sounds possible; happy to see what you come up with! Let's review when you have a PR.
from dabest-python.
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)
- color_col formatting HOT 2
- pandas version conflicts HOT 2
- Plot ONLY mean diff HOT 1
- Error with dataframes containing non-string column names HOT 3
- Is it possible to get access to the underlying bootstrap samples generated to obtain the 95% CI for ES? HOT 1
- cannot plot the figures HOT 3
- Estimation plot only HOT 1
- Warning: Not all points displayed... HOT 2
- Are multi-group p-values corrected for multiple comparisons? HOT 2
- contrast_ylim does not work for matplotlib HOT 1
- DABEST calculation of median difference CIs often fails HOT 5
- Error in bca.ci(boot.out, conf, index[1L], L = L, t = t.o, t0 = t0.o, : estimated adjustment 'a' is NA HOT 1
- New Release: v2023.02.14
- Error in changing the the linewidth of the lines used to join each pair of observations HOT 1
- Possibility to do mixed model statistics ? HOT 2
- Little problems with the plots HOT 3
- Limitation of paired analysis: Statistics comparing to only one group instead of with each other
- delta_g does not plot together with hedges_g
- Options for plot appearance HOT 2
- cannot plot figure - 'numpy.ndarray' object has no attribute 'categories' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dabest-python.