Skip to content

Commit a179eec

Browse files
committed
Minor tutorial text edits
1 parent 526066f commit a179eec

4 files changed

Lines changed: 40 additions & 34 deletions

File tree

nbs/tutorials/04-proportion_plot.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,7 +1685,7 @@
16851685
"source": [
16861686
"### Sankey kwargs\n",
16871687
"Several exclusive parameters can be provided to the ``.plot()`` method to customize the Sankey plots for paired proportions.\n",
1688-
"By modifying the sankey_kwargs parameter, you can customize the Sankey plot. The following parameters are supported:\n",
1688+
"By modifying the `sankey_kwargs` parameter, you can customize the Sankey plot. The following parameters are supported:\n",
16891689
"\n",
16901690
"- **align**: The alignment of each Sankey bar. Default is \"center\".\n",
16911691
"- **alpha**: The transparency of each Sankey bar. Default is 0.4.\n",
@@ -1849,7 +1849,7 @@
18491849
"\n",
18501850
"By default, the sample counts for each bar in proportion plots are not shown.\n",
18511851
"\n",
1852-
"This feature can be turned on by setting `prop_sample_counts=True` in the `.plot()` function.\n",
1852+
"This feature can be turned on by setting `prop_sample_counts=True` in the `.plot()` method.\n",
18531853
"\n",
18541854
"**Note**: This feature is not compatible with `flow=False` in `sankey_kwargs`."
18551855
]
@@ -1879,7 +1879,7 @@
18791879
"cell_type": "markdown",
18801880
"metadata": {},
18811881
"source": [
1882-
"The sample counts kwargs can be utilised via `prop_sample_counts_kwargs` in the `.plot()` function."
1882+
"The sample counts kwargs can be utilised via `prop_sample_counts_kwargs` in the `.plot()` method."
18831883
]
18841884
},
18851885
{

nbs/tutorials/06-delta_delta.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@
260260
"metadata": {},
261261
"source": [
262262
"To create a delta-delta plot, you simply need to set ``delta2=True`` in the \n",
263-
"``dabest.load()`` function. However, in this case,``x`` needs to be declared as a list consisting of 2 elements, unlike most cases where it is a single element. The first element in ``x`` will represent the variable plotted along the horizontal axis, and the second one will determine the color of dots for scattered plots or the color of lines for slope graphs. We use the ``experiment`` input to specify the grouping of the data."
263+
"``dabest.load()`` method. However, in this case,``x`` needs to be declared as a list consisting of 2 elements, unlike most cases where it is a single element. The first element in ``x`` will represent the variable plotted along the horizontal axis, and the second one will determine the color of dots for scattered plots or the color of lines for slope graphs. We use the ``experiment`` input to specify the grouping of the data."
264264
]
265265
},
266266
{
@@ -445,7 +445,7 @@
445445
"cell_type": "markdown",
446446
"metadata": {},
447447
"source": [
448-
"Utilising the `show_delta2` argument within the plot function allows for control of whether the delta-delta effect size is displayed on the plot. By default, this is set to `True`. "
448+
"Utilising the `show_delta2` argument within the `.plot()` method allows for control of whether the delta-delta effect size is displayed on the plot. By default, this is set to `True`. "
449449
]
450450
},
451451
{
@@ -624,7 +624,7 @@
624624
"metadata": {},
625625
"source": [
626626
"## Delta-delta for binary data\n",
627-
"Since **v2015.03.27**, the delta-delta function also supports binary data (proportion plots). In this case, the delta-delta value is calculated as the difference between the two proportions. This can be used for both unpaired and paired binary data."
627+
"Since **v2025.03.27**, the delta-delta function also supports binary data (proportion plots). In this case, the delta-delta value is calculated as the difference between the two proportions. This can be used for both unpaired and paired binary data."
628628
]
629629
},
630630
{
@@ -759,7 +759,7 @@
759759
"cell_type": "markdown",
760760
"metadata": {},
761761
"source": [
762-
"The ``delta_delta`` object has its own attributes, containing various information of delta - delta.\n",
762+
"The ``delta_delta`` object has its own attributes, containing various information of delta-delta.\n",
763763
"\n",
764764
" - ``difference``: the mean bootstrapped differences between the 2 groups of bootstrapped mean differences \n",
765765
" - ``bootstraps``: the 2 groups of bootstrapped mean differences \n",

nbs/tutorials/08-horizontal_plot.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@
462462
"source": [
463463
"### Swarm side\n",
464464
"\n",
465-
"As with the vertical plots, you can specify the side of the swarms via `swarm_side` in the `.plot()` function. \n",
465+
"As with the vertical plots, you can specify the side of the swarms via `swarm_side` in the `.plot()` method. \n",
466466
"\n",
467467
"In this case, `swarm_side='left'` would plot the swarms upwards, and `swarm_side='right'` would plot the swarms downwards."
468468
]
@@ -633,7 +633,7 @@
633633
"source": [
634634
"### Gridkey \n",
635635
"\n",
636-
"As with the vertical plots, you can utilise a gridkey table for representing the groupings. This can be reached via `gridkey` in the `.plot()` function. \n",
636+
"As with the vertical plots, you can utilise a gridkey table for representing the groupings. This can be reached via `gridkey` in the `.plot()` method. \n",
637637
"\n",
638638
"You can either use `gridkey='auto'` to automatically generate the gridkey, or pass a list of indexes to represent the groupings (e.g., `gridkey=['Control', 'Test']`).\n",
639639
"\n",

nbs/tutorials/09-plot_aesthetics.ipynb

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@
829829
"source": [
830830
"### Add counts to tick labels\n",
831831
"By default, the tick labels include the sample size for each group. This can be switched off via\n",
832-
"setting `show_sample_size=False` in the `.plot()` function. "
832+
"setting `show_sample_size=False` in the `.plot()` method. "
833833
]
834834
},
835835
{
@@ -1027,7 +1027,8 @@
10271027
}
10281028
],
10291029
"source": [
1030-
"multi_2group.mean_diff.plot(color_col=\"Gender\", legend_kwargs={'bbox_to_anchor': [0, 1], 'fontsize':8});"
1030+
"multi_2group.mean_diff.plot(color_col=\"Gender\", \n",
1031+
" legend_kwargs={'bbox_to_anchor': [0, 1], 'fontsize':8});"
10311032
]
10321033
},
10331034
{
@@ -1042,7 +1043,7 @@
10421043
"metadata": {},
10431044
"source": [
10441045
"## Hiding options \n",
1045-
"For mini-meta plots, it is possible to hide the weighted average plot by setting the parameter ``show_mini_meta=False`` in the ``.plot()`` function."
1046+
"For mini-meta plots, it is possible to hide the weighted average plot by setting the parameter ``show_mini_meta=False`` in the ``.plot()`` method."
10461047
]
10471048
},
10481049
{
@@ -1070,7 +1071,7 @@
10701071
"metadata": {},
10711072
"source": [
10721073
"Similarly, you can hide the delta-delta effect size by setting \n",
1073-
"``show_delta2=False`` in the ``.plot()`` function."
1074+
"``show_delta2=False`` in the ``.plot()`` method."
10741075
]
10751076
},
10761077
{
@@ -1181,7 +1182,7 @@
11811182
"cell_type": "markdown",
11821183
"metadata": {},
11831184
"source": [
1184-
"The type of group summary (gapped line) can be specified via `group_summaries` in the `.plot()` function and must be one of these: `'median_quartiles'`, `'mean_sd'`, `None`.\n",
1185+
"The type of group summary (gapped line) can be specified via `group_summaries` in the `.plot()` method and must be one of these: `'median_quartiles'`, `'mean_sd'`, `None`.\n",
11851186
"\n",
11861187
"By default, the group summary is set to `'mean_sd'`."
11871188
]
@@ -1275,7 +1276,7 @@
12751276
"cell_type": "markdown",
12761277
"metadata": {},
12771278
"source": [
1278-
"**Raw bars** are included in swarmplots and slopegraph plots by default. It can be turned off by setting `raw_bars=False` in the `.plot()` function."
1279+
"**Raw bars** are included in swarmplots and slopegraph plots by default. It can be turned off by setting `raw_bars=False` in the `.plot()` method."
12791280
]
12801281
},
12811282
{
@@ -1302,7 +1303,7 @@
13021303
"cell_type": "markdown",
13031304
"metadata": {},
13041305
"source": [
1305-
"Raw bar kwargs can be utilised via `raw_bars_kwargs` in the `.plot()` function.\n",
1306+
"Raw bar kwargs can be utilised via `raw_bars_kwargs` in the `.plot()` method.\n",
13061307
"\n",
13071308
"Pass any keyword arguments accepted by matplotlib.patches.Rectangle here, as a string."
13081309
]
@@ -1334,7 +1335,7 @@
13341335
"metadata": {},
13351336
"source": [
13361337
"## Contrast bars\n",
1337-
"**Contrast bars** are included in all plots by default. It can be turned off by setting `contrast_bars=False` in the `.plot()` function."
1338+
"**Contrast bars** are included in all plots by default. It can be turned off by setting `contrast_bars=False` in the `.plot()` method."
13381339
]
13391340
},
13401341
{
@@ -1361,7 +1362,7 @@
13611362
"cell_type": "markdown",
13621363
"metadata": {},
13631364
"source": [
1364-
"Contrast bar kwargs can be utilised via `contrast_bars_kwargs` in the `.plot()` function.\n",
1365+
"Contrast bar kwargs can be utilised via `contrast_bars_kwargs` in the `.plot()` method.\n",
13651366
"\n",
13661367
"Pass any keyword arguments accepted by matplotlib.patches.Rectangle here, as a string."
13671368
]
@@ -1393,7 +1394,7 @@
13931394
"metadata": {},
13941395
"source": [
13951396
"## Reference band\n",
1396-
"A **reference band** can be added for each relevant contrast object as desired via supplying a list to the argument `reference_band` in the `.plot()` function."
1397+
"A **reference band** can be added for each relevant contrast object as desired via supplying a list to the argument `reference_band` in the `.plot()` method."
13971398
]
13981399
},
13991400
{
@@ -1420,7 +1421,7 @@
14201421
"cell_type": "markdown",
14211422
"metadata": {},
14221423
"source": [
1423-
"Reference band kwargs can be utilised via `reference_band_kwargs` in the `.plot()` function.\n",
1424+
"Reference band kwargs can be utilised via `reference_band_kwargs` in the `.plot()` method.\n",
14241425
"\n",
14251426
"The relevant inputs to `reference_band_kwargs` are:\n",
14261427
"\n",
@@ -1457,7 +1458,7 @@
14571458
"metadata": {},
14581459
"source": [
14591460
"## Delta text\n",
1460-
"**Delta text** is included in all plots by default. It can be turned off by setting `delta_text=False` in the `.plot()` function."
1461+
"**Delta text** is included in all plots by default. It can be turned off by setting `delta_text=False` in the `.plot()` method."
14611462
]
14621463
},
14631464
{
@@ -1484,7 +1485,7 @@
14841485
"cell_type": "markdown",
14851486
"metadata": {},
14861487
"source": [
1487-
"Delta text kwargs can be utilised via `delta_text_kwargs` in the `.plot()` function.\n",
1488+
"Delta text kwargs can be utilised via `delta_text_kwargs` in the `.plot()` method.\n",
14881489
"\n",
14891490
"The relevant inputs to `delta_text_kwargs` are:\n",
14901491
"\n",
@@ -1518,7 +1519,8 @@
15181519
}
15191520
],
15201521
"source": [
1521-
"multi_2group.mean_diff.plot(delta_text=True, delta_text_kwargs={\"color\":\"red\", \"rotation\":45, \"va\":\"bottom\", \"alpha\":0.7});"
1522+
"multi_2group.mean_diff.plot(delta_text=True, \n",
1523+
" delta_text_kwargs={\"color\":\"red\", \"rotation\":45, \"va\":\"bottom\", \"alpha\":0.7});"
15221524
]
15231525
},
15241526
{
@@ -1545,7 +1547,9 @@
15451547
}
15461548
],
15471549
"source": [
1548-
"multi_2group.mean_diff.plot(delta_text=True, delta_text_kwargs={\"x_coordinates\":(0.5, 2.75), \"y_coordinates\":(0.5, -1.7)});"
1550+
"multi_2group.mean_diff.plot(delta_text=True, \n",
1551+
" delta_text_kwargs={\"x_coordinates\":(0.5, 2.75), \n",
1552+
" \"y_coordinates\":(0.5, -1.7)});"
15491553
]
15501554
},
15511555
{
@@ -1572,7 +1576,8 @@
15721576
}
15731577
],
15741578
"source": [
1575-
"multi_2group.mean_diff.plot(delta_text=True, delta_text_kwargs={\"offset\":0.1});"
1579+
"multi_2group.mean_diff.plot(delta_text=True, \n",
1580+
" delta_text_kwargs={\"offset\":0.1});"
15761581
]
15771582
},
15781583
{
@@ -1585,7 +1590,7 @@
15851590
"\n",
15861591
"This can be useful for specific paired plots when there are many overlapping points.\n",
15871592
"\n",
1588-
"Currently, Jitter is only available for slopegraphs and only in the x-direction (vertical plots) or y-direction (horizontal plots)."
1593+
"Currently, jitter is only available for slopegraphs and only in the x-direction (vertical plots) or y-direction (horizontal plots)."
15891594
]
15901595
},
15911596
{
@@ -1672,7 +1677,7 @@
16721677
"source": [
16731678
"## Gridkey\n",
16741679
"\n",
1675-
"You can utilise a gridkey table format for representing the index groupings. This can be reached via `gridkey` in the `.plot()` function. \n",
1680+
"You can utilise a gridkey table format for representing the index groupings. This can be reached via `gridkey` in the `.plot()` method. \n",
16761681
"\n",
16771682
"You can either use `gridkey='auto'` to automatically generate the gridkey, or pass a list of indexes to represent the groupings (e.g., `gridkey=['Control', 'Test']`)."
16781683
]
@@ -1701,7 +1706,7 @@
17011706
"cell_type": "markdown",
17021707
"metadata": {},
17031708
"source": [
1704-
"Gridkey kwargs can be utilised via `gridkey_kwargs` in the `.plot()` function.\n",
1709+
"Gridkey kwargs can be utilised via `gridkey_kwargs` in the `.plot()` method.\n",
17051710
"\n",
17061711
"The relevant inputs to `gridkey_kwargs` are:\n",
17071712
"\n",
@@ -1745,7 +1750,7 @@
17451750
"\n",
17461751
"By default, delta dots are included in paired experiment plots (excluding proportion plots). \n",
17471752
"\n",
1748-
"This feature can be turned off by setting `delta_dot=False` in the `.plot()` function."
1753+
"This feature can be turned off by setting `delta_dot=False` in the `.plot()` method."
17491754
]
17501755
},
17511756
{
@@ -1772,7 +1777,7 @@
17721777
"cell_type": "markdown",
17731778
"metadata": {},
17741779
"source": [
1775-
"Delta dot kwargs can be utilised via `delta_dot_kwargs` in the `.plot()` function.\n",
1780+
"Delta dot kwargs can be utilised via `delta_dot_kwargs` in the `.plot()` method.\n",
17761781
"\n",
17771782
"The relevant inputs to `delta_dot_kwargs` are:\n",
17781783
"\n",
@@ -1812,7 +1817,7 @@
18121817
"\n",
18131818
"By default, effect size paired lines are included in paired experiment plots (excluding proportion plots). \n",
18141819
"\n",
1815-
"This feature can be turned off by setting `contrast_paired_lines=False` in the `.plot()` function."
1820+
"This feature can be turned off by setting `contrast_paired_lines=False` in the `.plot()` method."
18161821
]
18171822
},
18181823
{
@@ -1839,7 +1844,7 @@
18391844
"cell_type": "markdown",
18401845
"metadata": {},
18411846
"source": [
1842-
"Effect size line kwargs can be utilised via `contrast_paired_lines_kwargs` in the `.plot()` function.\n",
1847+
"Effect size line kwargs can be utilised via `contrast_paired_lines_kwargs` in the `.plot()` method.\n",
18431848
"\n",
18441849
"By default, the following keywords are passed:\n",
18451850
"\n",
@@ -1867,7 +1872,8 @@
18671872
}
18681873
],
18691874
"source": [
1870-
"repeated_measures.mean_diff.plot(contrast_paired_lines=True, contrast_paired_lines_kwargs={\"color\": \"red\", \"alpha\": 0.5, \"linestyle\": \"-\"}); "
1875+
"repeated_measures.mean_diff.plot(contrast_paired_lines=True, \n",
1876+
" contrast_paired_lines_kwargs={\"color\": \"red\", \"alpha\": 0.5, \"linestyle\": \"-\"}); "
18711877
]
18721878
},
18731879
{
@@ -1877,7 +1883,7 @@
18771883
"## Baseline error curve\n",
18781884
"\n",
18791885
"In DABEST **v2025.03.27**, we introduce a new aspect to the contrast axes: the baseline dot and error curve. \n",
1880-
"While the baseline dot is always present, the error curve can be turned on by setting `show_baseline_ec=True` in the `.plot()` function."
1886+
"While the baseline dot is always present, the error curve can be turned on by setting `show_baseline_ec=True` in the `.plot()` method."
18811887
]
18821888
},
18831889
{

0 commit comments

Comments
 (0)