| Total Complexity | 7 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import seaborn as sns |
||
| 2 | |||
| 3 | from sacredfig.main import restyle_axis |
||
| 4 | |||
| 5 | |||
| 6 | STRIPPLOT_KWARGS = { |
||
| 7 | "linewidth": 0.1, |
||
| 8 | "size": 3, |
||
| 9 | "alpha": 0.2, |
||
| 10 | "color": "k", |
||
| 11 | "facecolors": "none", |
||
| 12 | "edgecolors": "r", |
||
| 13 | "marker": "$\circ$", |
||
| 14 | } |
||
| 15 | |||
| 16 | |||
| 17 | def boxplot(*args, **kwargs): |
||
| 18 | if kwargs is None: |
||
| 19 | kwargs = dict() |
||
| 20 | if args is None: |
||
| 21 | args = dict() |
||
| 22 | |||
| 23 | sns.boxplot(*args, **kwargs) |
||
| 24 | |||
| 25 | if "ax" in kwargs: |
||
| 26 | restyle_axis( |
||
| 27 | kwargs["ax"], |
||
| 28 | artistprops=dict(ec="k", fc="w", lw=0.5), |
||
| 29 | lineprops=dict(color="k", lw=0.5), |
||
| 30 | ) |
||
| 31 | |||
| 32 | |||
| 33 | def stripplot(*args, **kwargs): |
||
| 34 | if kwargs is None: |
||
| 35 | kwargs = dict() |
||
| 36 | if args is None: |
||
| 37 | args = dict() |
||
| 38 | |||
| 39 | kwargs.update(STRIPPLOT_KWARGS) |
||
| 40 | |||
| 41 | return sns.stripplot(*args, **kwargs) |
||
| 42 | |||
| 43 | |||
| 44 | boxplot.__doc__ = sns.boxplot.__doc__ |
||
| 45 | stripplot.__doc__ = sns.stripplot.__doc__ |
||
| 46 |