|
829 | 829 | "source": [ |
830 | 830 | "### Add counts to tick labels\n", |
831 | 831 | "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. " |
833 | 833 | ] |
834 | 834 | }, |
835 | 835 | { |
|
1027 | 1027 | } |
1028 | 1028 | ], |
1029 | 1029 | "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});" |
1031 | 1032 | ] |
1032 | 1033 | }, |
1033 | 1034 | { |
|
1042 | 1043 | "metadata": {}, |
1043 | 1044 | "source": [ |
1044 | 1045 | "## 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." |
1046 | 1047 | ] |
1047 | 1048 | }, |
1048 | 1049 | { |
|
1070 | 1071 | "metadata": {}, |
1071 | 1072 | "source": [ |
1072 | 1073 | "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." |
1074 | 1075 | ] |
1075 | 1076 | }, |
1076 | 1077 | { |
|
1181 | 1182 | "cell_type": "markdown", |
1182 | 1183 | "metadata": {}, |
1183 | 1184 | "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", |
1185 | 1186 | "\n", |
1186 | 1187 | "By default, the group summary is set to `'mean_sd'`." |
1187 | 1188 | ] |
|
1275 | 1276 | "cell_type": "markdown", |
1276 | 1277 | "metadata": {}, |
1277 | 1278 | "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." |
1279 | 1280 | ] |
1280 | 1281 | }, |
1281 | 1282 | { |
|
1302 | 1303 | "cell_type": "markdown", |
1303 | 1304 | "metadata": {}, |
1304 | 1305 | "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", |
1306 | 1307 | "\n", |
1307 | 1308 | "Pass any keyword arguments accepted by matplotlib.patches.Rectangle here, as a string." |
1308 | 1309 | ] |
|
1334 | 1335 | "metadata": {}, |
1335 | 1336 | "source": [ |
1336 | 1337 | "## 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." |
1338 | 1339 | ] |
1339 | 1340 | }, |
1340 | 1341 | { |
|
1361 | 1362 | "cell_type": "markdown", |
1362 | 1363 | "metadata": {}, |
1363 | 1364 | "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", |
1365 | 1366 | "\n", |
1366 | 1367 | "Pass any keyword arguments accepted by matplotlib.patches.Rectangle here, as a string." |
1367 | 1368 | ] |
|
1393 | 1394 | "metadata": {}, |
1394 | 1395 | "source": [ |
1395 | 1396 | "## 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." |
1397 | 1398 | ] |
1398 | 1399 | }, |
1399 | 1400 | { |
|
1420 | 1421 | "cell_type": "markdown", |
1421 | 1422 | "metadata": {}, |
1422 | 1423 | "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", |
1424 | 1425 | "\n", |
1425 | 1426 | "The relevant inputs to `reference_band_kwargs` are:\n", |
1426 | 1427 | "\n", |
|
1457 | 1458 | "metadata": {}, |
1458 | 1459 | "source": [ |
1459 | 1460 | "## 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." |
1461 | 1462 | ] |
1462 | 1463 | }, |
1463 | 1464 | { |
|
1484 | 1485 | "cell_type": "markdown", |
1485 | 1486 | "metadata": {}, |
1486 | 1487 | "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", |
1488 | 1489 | "\n", |
1489 | 1490 | "The relevant inputs to `delta_text_kwargs` are:\n", |
1490 | 1491 | "\n", |
|
1518 | 1519 | } |
1519 | 1520 | ], |
1520 | 1521 | "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});" |
1522 | 1524 | ] |
1523 | 1525 | }, |
1524 | 1526 | { |
|
1545 | 1547 | } |
1546 | 1548 | ], |
1547 | 1549 | "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)});" |
1549 | 1553 | ] |
1550 | 1554 | }, |
1551 | 1555 | { |
|
1572 | 1576 | } |
1573 | 1577 | ], |
1574 | 1578 | "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});" |
1576 | 1581 | ] |
1577 | 1582 | }, |
1578 | 1583 | { |
|
1585 | 1590 | "\n", |
1586 | 1591 | "This can be useful for specific paired plots when there are many overlapping points.\n", |
1587 | 1592 | "\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)." |
1589 | 1594 | ] |
1590 | 1595 | }, |
1591 | 1596 | { |
|
1672 | 1677 | "source": [ |
1673 | 1678 | "## Gridkey\n", |
1674 | 1679 | "\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", |
1676 | 1681 | "\n", |
1677 | 1682 | "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']`)." |
1678 | 1683 | ] |
|
1701 | 1706 | "cell_type": "markdown", |
1702 | 1707 | "metadata": {}, |
1703 | 1708 | "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", |
1705 | 1710 | "\n", |
1706 | 1711 | "The relevant inputs to `gridkey_kwargs` are:\n", |
1707 | 1712 | "\n", |
|
1745 | 1750 | "\n", |
1746 | 1751 | "By default, delta dots are included in paired experiment plots (excluding proportion plots). \n", |
1747 | 1752 | "\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." |
1749 | 1754 | ] |
1750 | 1755 | }, |
1751 | 1756 | { |
|
1772 | 1777 | "cell_type": "markdown", |
1773 | 1778 | "metadata": {}, |
1774 | 1779 | "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", |
1776 | 1781 | "\n", |
1777 | 1782 | "The relevant inputs to `delta_dot_kwargs` are:\n", |
1778 | 1783 | "\n", |
|
1812 | 1817 | "\n", |
1813 | 1818 | "By default, effect size paired lines are included in paired experiment plots (excluding proportion plots). \n", |
1814 | 1819 | "\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." |
1816 | 1821 | ] |
1817 | 1822 | }, |
1818 | 1823 | { |
|
1839 | 1844 | "cell_type": "markdown", |
1840 | 1845 | "metadata": {}, |
1841 | 1846 | "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", |
1843 | 1848 | "\n", |
1844 | 1849 | "By default, the following keywords are passed:\n", |
1845 | 1850 | "\n", |
|
1867 | 1872 | } |
1868 | 1873 | ], |
1869 | 1874 | "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\": \"-\"}); " |
1871 | 1877 | ] |
1872 | 1878 | }, |
1873 | 1879 | { |
|
1877 | 1883 | "## Baseline error curve\n", |
1878 | 1884 | "\n", |
1879 | 1885 | "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." |
1881 | 1887 | ] |
1882 | 1888 | }, |
1883 | 1889 | { |
|
0 commit comments