From c298824f51293e561bf7ee476b4277988f26adf8 Mon Sep 17 00:00:00 2001 From: JAnns98 Date: Tue, 10 Sep 2024 12:06:38 +0800 Subject: [PATCH] removing the commented out code from prior change --- dabest/plotter.py | 53 ------------------------------------------- nbs/API/plotter.ipynb | 53 ------------------------------------------- 2 files changed, 106 deletions(-) diff --git a/dabest/plotter.py b/dabest/plotter.py index 33a35a6c..b2dcf002 100644 --- a/dabest/plotter.py +++ b/dabest/plotter.py @@ -344,59 +344,6 @@ def effectsize_df_plotter(effectsize_df, **plot_kwargs): results = effectsize_df.results contrast_xtick_labels = [] - # for j, tick in enumerate(ticks_to_plot): - # current_group = results.test[j] - # current_control = results.control[j] - # current_bootstrap = results.bootstraps[j] - # current_effsize = results.difference[j] - # if ci_type == "bca": - # current_ci_low = results.bca_low[j] - # current_ci_high = results.bca_high[j] - # else: - # current_ci_low = results.pct_low[j] - # current_ci_high = results.pct_high[j] - - # # Create the violinplot. - # # New in v0.2.6: drop negative infinities before plotting. - # v = contrast_axes.violinplot( - # current_bootstrap[~np.isinf(current_bootstrap)], - # positions=[tick], - # **violinplot_kwargs - # ) - # # Turn the violinplot into half, and color it the same as the swarmplot. - # # Do this only if the color column is not specified. - # # Ideally, the alpha (transparency) fo the violin plot should be - # # less than one so the effect size and CIs are visible. - # if bootstraps_color_by_group: - # fc = plot_palette_contrast[current_group] - # else: - # fc = "grey" - - # halfviolin(v, fill_color=fc, alpha=halfviolin_alpha) - - # # Plot the effect size. - # contrast_axes.plot( - # [tick], - # current_effsize, - # marker="o", - # color=ytick_color, - # markersize=es_marker_size, - # ) - - # # Plot the confidence interval. - # contrast_axes.plot( - # [tick, tick], - # [current_ci_low, current_ci_high], - # linestyle="-", - # color=ytick_color, - # linewidth=group_summary_kwargs["lw"], - # ) - - # contrast_xtick_labels.append( - # "{}\nminus\n{}".format(current_group, current_control) - # ) - - ##### WIP (current_group, current_control, current_effsize) = effect_size_curve_plotter(ticks_to_plot=ticks_to_plot, diff --git a/nbs/API/plotter.ipynb b/nbs/API/plotter.ipynb index 7456c5d1..5c48d14d 100644 --- a/nbs/API/plotter.ipynb +++ b/nbs/API/plotter.ipynb @@ -403,59 +403,6 @@ " results = effectsize_df.results\n", " contrast_xtick_labels = []\n", "\n", - " # for j, tick in enumerate(ticks_to_plot):\n", - " # current_group = results.test[j]\n", - " # current_control = results.control[j]\n", - " # current_bootstrap = results.bootstraps[j]\n", - " # current_effsize = results.difference[j]\n", - " # if ci_type == \"bca\":\n", - " # current_ci_low = results.bca_low[j]\n", - " # current_ci_high = results.bca_high[j]\n", - " # else:\n", - " # current_ci_low = results.pct_low[j]\n", - " # current_ci_high = results.pct_high[j]\n", - "\n", - " # # Create the violinplot.\n", - " # # New in v0.2.6: drop negative infinities before plotting.\n", - " # v = contrast_axes.violinplot(\n", - " # current_bootstrap[~np.isinf(current_bootstrap)],\n", - " # positions=[tick],\n", - " # **violinplot_kwargs\n", - " # )\n", - " # # Turn the violinplot into half, and color it the same as the swarmplot.\n", - " # # Do this only if the color column is not specified.\n", - " # # Ideally, the alpha (transparency) fo the violin plot should be\n", - " # # less than one so the effect size and CIs are visible.\n", - " # if bootstraps_color_by_group:\n", - " # fc = plot_palette_contrast[current_group]\n", - " # else:\n", - " # fc = \"grey\"\n", - "\n", - " # halfviolin(v, fill_color=fc, alpha=halfviolin_alpha)\n", - "\n", - " # # Plot the effect size.\n", - " # contrast_axes.plot(\n", - " # [tick],\n", - " # current_effsize,\n", - " # marker=\"o\",\n", - " # color=ytick_color,\n", - " # markersize=es_marker_size,\n", - " # )\n", - "\n", - " # # Plot the confidence interval.\n", - " # contrast_axes.plot(\n", - " # [tick, tick],\n", - " # [current_ci_low, current_ci_high],\n", - " # linestyle=\"-\",\n", - " # color=ytick_color,\n", - " # linewidth=group_summary_kwargs[\"lw\"],\n", - " # )\n", - "\n", - " # contrast_xtick_labels.append(\n", - " # \"{}\\nminus\\n{}\".format(current_group, current_control)\n", - " # )\n", - "\n", - "\n", " ##### WIP\n", " (current_group, current_control, \n", " current_effsize) = effect_size_curve_plotter(ticks_to_plot=ticks_to_plot, \n",