Example #1
0
def swarmplot(data, **kwargs):
    def sns_swarmplot(x, y, hue, split, orient, color, size,
                      linewidth):  # pragma: no cover
        x, y, hue, orient, color = ut.widget2py(x, y, hue, orient, color)
        ax, fig, _ = ut.get_ax_fig_plt()
        return sns.swarmplot(x=x,
                             y=y,
                             hue=hue,
                             data=data,
                             order=None,
                             hue_order=None,
                             split=split,
                             orient=orient,
                             color=color,
                             palette=None,
                             size=size,
                             edgecolor='gray',
                             linewidth=linewidth,
                             ax=ax,
                             **kwargs)

    allcols = ["None"] + list(data.keys())
    return ipw.interact_manual(
        sns_swarmplot,
        x=allcols,
        y=allcols,
        hue=allcols,
        split=False,
        orient=["None", "v", "h"],
        color=ut.colors_dropdow(),
        size=ut.size_slider(default=5),
        linewidth=ut.linewidth_slider(default=0),
    )
Example #2
0
def lmplot(data, scatter_kws=None, line_kws=None):
    def sns_lmplot(x, y, hue, col, row, legend, size):  # pragma: no cover
        x, y, hue, col, row = ut.widget2py(x, y, hue, col, row)

        return sns.lmplot(x,
                          y,
                          data,
                          hue=hue,
                          col=col,
                          row=row,
                          palette=None,
                          col_wrap=None,
                          size=size,
                          aspect=1,
                          markers='o',
                          sharex=True,
                          sharey=True,
                          hue_order=None,
                          col_order=None,
                          row_order=None,
                          legend=legend,
                          legend_out=True,
                          x_estimator=None,
                          x_bins=None,
                          x_ci='ci',
                          scatter=True,
                          fit_reg=True,
                          ci=95,
                          n_boot=1000,
                          units=None,
                          order=1,
                          logistic=False,
                          lowess=False,
                          robust=False,
                          logx=False,
                          x_partial=None,
                          y_partial=None,
                          truncate=False,
                          x_jitter=None,
                          y_jitter=None,
                          scatter_kws=scatter_kws,
                          line_kws=line_kws)

    allcols = ["None"] + list(data.keys())
    return ipw.interact_manual(
        sns_lmplot,
        x=allcols,
        y=allcols,
        hue=allcols,
        col=allcols,
        row=allcols,
        legend=True,
        size=ut.size_slider(default=5),
    )
Example #3
0
def factorplot(data, facet_kws=None, **kwargs):
    def sns_factorplot(x, y, hue, color, kind, size,
                       legend):  # pragma: no cover
        x, y, hue, color = ut.widget2py(x, y, hue, color)
        return sns.factorplot(
            x=x,
            y=y,
            hue=hue,
            data=data,
            row=None,
            col=None,
            col_wrap=None,  # estimator=<function mean>,
            ci=95,
            n_boot=1000,
            units=None,
            order=None,
            hue_order=None,
            row_order=None,
            col_order=None,
            kind=kind,
            size=size,
            aspect=1,
            orient=None,
            color=color,
            palette=None,
            legend=legend,
            legend_out=True,
            sharex=True,
            sharey=True,
            margin_titles=False,
            facet_kws=facet_kws,
            **kwargs)

    allcols = ["None"] + list(data.keys())
    return ipw.interact_manual(
        sns_factorplot,
        x=allcols,
        y=allcols,
        hue=allcols,
        color=ut.colors_dropdow(),
        kind=["point", "bar", "count", "box", "violin", "strip"],
        size=ut.size_slider(default=4),
        legend=True,
    )
Example #4
0
def swarmplot(data, **kwargs):

    def sns_swarmplot(x, y, hue, split, orient, color, size, linewidth): # pragma: no cover
        x, y, hue, orient, color = ut.widget2py(x, y, hue, orient, color)
        ax, fig, _ = ut.get_ax_fig_plt()
        return sns.swarmplot(x=x, y=y, hue=hue, data=data, order=None, hue_order=None,
                            split=split, orient=orient, color=color, palette=None, size=size,
                            edgecolor='gray', linewidth=linewidth, ax=ax, **kwargs)

    allcols = ["None"] + list(data.keys())
    return ipw.interact_manual(
                sns_swarmplot,
                x=allcols,
                y=allcols,
                hue=allcols,
                split=False,
                orient=["None", "v", "h"],
                color=ut.colors_dropdow(),
                size=ut.size_slider(default=5),
                linewidth=ut.linewidth_slider(default=0),
            )
Example #5
0
def factorplot(data, facet_kws=None, **kwargs):

    def sns_factorplot(x, y, hue, color, kind, size, legend):  # pragma: no cover
        x, y, hue, color = ut.widget2py(x, y, hue, color)
        return sns.factorplot(x=x, y=y, hue=hue, data=data, row=None, col=None, col_wrap=None, # estimator=<function mean>,
                       ci=95, n_boot=1000, units=None, order=None, hue_order=None, row_order=None, col_order=None,
                       kind=kind, size=size, aspect=1, orient=None, color=color, palette=None,
                       legend=legend, legend_out=True, sharex=True, sharey=True, margin_titles=False,
                       facet_kws=facet_kws, **kwargs)

    allcols = ["None"] + list(data.keys())
    return ipw.interact_manual(
                sns_factorplot,
                x=allcols,
                y=allcols,
                hue=allcols,
                color=ut.colors_dropdow(),
                kind=["point", "bar", "count", "box", "violin", "strip"],
                size=ut.size_slider(default=4),
                legend=True,
            )
Example #6
0
def lmplot(data, scatter_kws=None, line_kws=None):

    def sns_lmplot(x, y, hue, col, row, legend, size):  # pragma: no cover
        x, y, hue, col, row = ut.widget2py(x, y, hue, col, row)

        return sns.lmplot(x, y, data, hue=hue, col=col, row=row, palette=None, col_wrap=None,
                   size=size, aspect=1, markers='o', sharex=True, sharey=True, hue_order=None,
                   col_order=None, row_order=None, legend=legend, legend_out=True,
                   x_estimator=None, x_bins=None, x_ci='ci', scatter=True, fit_reg=True,
                   ci=95, n_boot=1000, units=None, order=1, logistic=False, lowess=False, robust=False,
                   logx=False, x_partial=None, y_partial=None, truncate=False, x_jitter=None, y_jitter=None,
                   scatter_kws=scatter_kws, line_kws=line_kws)

    allcols = ["None"] + list(data.keys())
    return ipw.interact_manual(
                sns_lmplot,
                x=allcols,
                y=allcols,
                hue=allcols,
                col=allcols,
                row=allcols,
                legend=True,
                size=ut.size_slider(default=5),
            )