Skip to content

Commit 8ec6d11

Browse files
committed
Merge branch 'propplot'
2 parents 14fdead + 1da1bac commit 8ec6d11

35 files changed

Lines changed: 341 additions & 38 deletions

dabest/_api.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,16 @@ def load(data, idx=None, x=None, y=None, paired=None, id_col=None,
8787
8888
>>> my_data = dabest.load(df, idx=("Control 1", "Test 1"))
8989
90+
For proportion plot.
91+
>>> np.random.seed(88888)
92+
>>> N = 10
93+
>>> c1 = np.random.binomial(1, 0.2, size=N)
94+
>>> t1 = np.random.binomial(1, 0.5, size=N)
95+
>>> df = pd.DataFrame({'Control 1' : c1, 'Test 1': t1})
96+
>>> my_data = dabest.load(df, idx=("Control 1", "Test 1"),proportional=True)
97+
98+
99+
90100
'''
91101
from ._classes import Dabest
92102

dabest/plotter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ def EffectSizeDataFramePlotter(EffectSizeDataFrame, **plot_kwargs):
290290

291291
# Initialise the figure.
292292
# sns.set(context="talk", style='ticks')
293-
init_fig_kwargs = dict(figsize=fig_size, dpi=plot_kwargs["dpi"])
294-
# ,tight_layout=True)
293+
init_fig_kwargs = dict(figsize=fig_size, dpi=plot_kwargs["dpi"]
294+
,tight_layout=True)
295295

296296
width_ratios_ga = [2.5, 1]
297297
h_space_cummings = 0.3
@@ -365,7 +365,7 @@ def EffectSizeDataFramePlotter(EffectSizeDataFrame, **plot_kwargs):
365365
contrast_axes = axx[1]
366366
rawdata_axes.set_frame_on(False)
367367
contrast_axes.set_frame_on(False)
368-
fig.set_tight_layout(False)
368+
# fig.set_tight_layout(False)
369369

370370
redraw_axes_kwargs = {'colors' : ytick_color,
371371
'facecolors' : ytick_color,
5.5 KB
Loading
Binary file not shown.
3.07 KB
Loading
Binary file not shown.
31.6 KB
Loading
Binary file not shown.
7.16 KB
Loading
7.44 KB
Loading

0 commit comments

Comments
 (0)