Skip to content

Commit

Permalink
Edit text for swarmplot legend
Browse files Browse the repository at this point in the history
  • Loading branch information
JAnns98 committed Sep 16, 2024
1 parent 2df0aff commit 57f0c58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions dabest/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def effectsize_df_plotter(effectsize_df, **plot_kwargs):
legend_kwargs=legend_kwargs
)

########## WIP LEGENDS
# Add legend for swarmplot
if not show_pairs and not proportional and color_col is not None and not show_delta2:
if len(np.unique(swarm_legend_kwargs['index'])) > 1:
legend_elements = []
Expand All @@ -407,8 +407,6 @@ def effectsize_df_plotter(effectsize_df, **plot_kwargs):
markerfacecolor=color, markersize=10))
rawdata_axes.legend(handles=legend_elements, frameon=False)

########## WIP LEGENDS

# Plot aesthetic adjustments.
og_ylim_raw = rawdata_axes.get_ylim()
og_xlim_raw = rawdata_axes.get_xlim()
Expand Down
4 changes: 1 addition & 3 deletions nbs/API/plotter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@
" legend_kwargs=legend_kwargs\n",
" )\n",
"\n",
" ########## WIP LEGENDS\n",
" # Add legend for swarmplot\n",
" if not show_pairs and not proportional and color_col is not None and not show_delta2:\n",
" if len(np.unique(swarm_legend_kwargs['index'])) > 1:\n",
" legend_elements = []\n",
Expand All @@ -466,8 +466,6 @@
" markerfacecolor=color, markersize=10))\n",
" rawdata_axes.legend(handles=legend_elements, frameon=False)\n",
"\n",
" ########## WIP LEGENDS\n",
"\n",
" # Plot aesthetic adjustments.\n",
" og_ylim_raw = rawdata_axes.get_ylim()\n",
" og_xlim_raw = rawdata_axes.get_xlim()\n",
Expand Down

0 comments on commit 57f0c58

Please sign in to comment.