Skip to content

Conversation

Jacobluke-
Copy link
Collaborator

No description provided.

JAnns98 added 30 commits April 5, 2024 17:51
Added functionality for all use cases (as far as I can see). Need more testing.
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@Jacobluke- Jacobluke- requested a review from JAnns98 September 19, 2024 06:01
Copy link
Collaborator

@JAnns98 JAnns98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Significant changes, including trimming the plotter function and creating smaller functions in plot_tools and misc_tools to restructure the code and improve readability and future changes. Some additional edits are needed to add doc strings and comments to these added features in a subsequent patch.

Currently, the legend for swarmplot with color_col appears to be plotting the legend dots twice in the test images. I am unable to recreate this in my testing notebook, so it seems to be specific to test images - but we should keep this in mind in case it comes up.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue with the legend plotting the dots twice. Seems to be a specific issue with the test images as I am currently unable to replicate this in testing.

…ntrast-bars

# Conflicts:
#	dabest/misc_tools.py
#	dabest/plot_tools.py
#	dabest/plotter.py
#	nbs/API/misc_tools.ipynb
#	nbs/API/plot_tools.ipynb
#	nbs/API/plotter.ipynb
#	nbs/tests/mpl_image_tests/baseline_images/test_01_gardner_altman_unpaired_meandiff.png
#	nbs/tests/mpl_image_tests/baseline_images/test_02_gardner_altman_unpaired_mediandiff.png
#	nbs/tests/mpl_image_tests/baseline_images/test_03_gardner_altman_unpaired_hedges_g.png
#	nbs/tests/mpl_image_tests/baseline_images/test_05_cummings_two_group_unpaired_meandiff.png
#	nbs/tests/mpl_image_tests/baseline_images/test_07_cummings_multi_group_unpaired.png
#	nbs/tests/mpl_image_tests/baseline_images/test_09_cummings_shared_control.png
#	nbs/tests/mpl_image_tests/baseline_images/test_10_cummings_multi_groups.png
#	nbs/tests/mpl_image_tests/baseline_images/test_11_inset_plots.png
#	nbs/tests/mpl_image_tests/baseline_images/test_12_gardner_altman_ylabel.png
#	nbs/tests/mpl_image_tests/baseline_images/test_16_change_palette_b.png
#	nbs/tests/mpl_image_tests/baseline_images/test_17_change_palette_c.png
#	nbs/tests/mpl_image_tests/baseline_images/test_18_desat.png
#	nbs/tests/mpl_image_tests/baseline_images/test_19_dot_sizes.png
#	nbs/tests/mpl_image_tests/baseline_images/test_20_change_ylims.png
#	nbs/tests/mpl_image_tests/baseline_images/test_21_invert_ylim.png
#	nbs/tests/mpl_image_tests/baseline_images/test_22_ticker_gardner_altman.png
#	nbs/tests/mpl_image_tests/baseline_images/test_23_ticker_cumming.png
#	nbs/tests/mpl_image_tests/baseline_images/test_24_wide_df_nan.png
#	nbs/tests/mpl_image_tests/baseline_images/test_25_long_df_nan.png
#	nbs/tests/mpl_image_tests/baseline_images/test_27_gardner_altman_reflines_kwargs.png
#	nbs/tests/mpl_image_tests/baseline_images/test_28_unpaired_cumming_reflines_kwargs.png
#	nbs/tests/mpl_image_tests/baseline_images/test_47_cummings_unpaired_delta_delta_meandiff.png
#	nbs/tests/mpl_image_tests/baseline_images/test_52_delta_specified.png
#	nbs/tests/mpl_image_tests/baseline_images/test_56_delta_cohens_d.png
#	nbs/tests/mpl_image_tests/baseline_images/test_57_delta_show_delta2.png
#	nbs/tests/mpl_image_tests/baseline_images/test_58_delta_axes_invert_ylim.png
#	nbs/tests/mpl_image_tests/baseline_images/test_59_delta_axes_invert_ylim_not_showing_delta2.png
#	nbs/tests/mpl_image_tests/baseline_images/test_60_cummings_unpaired_mini_meta_meandiff.png
#	nbs/tests/mpl_image_tests/baseline_images/test_64_mini_meta_plot_change_palette_a.png
#	nbs/tests/mpl_image_tests/baseline_images/test_65_mini_meta_dot_sizes.png
#	nbs/tests/mpl_image_tests/baseline_images/test_69_mini_meta_cohens_d.png
#	nbs/tests/mpl_image_tests/baseline_images/test_70_mini_meta_not_show.png
#	nbs/tests/mpl_image_tests/baseline_images/test_71_unpaired_delta_g.png
#	nbs/tests/mpl_image_tests/baseline_images/test_99_style_sheets.png
@Jacobluke-
Copy link
Collaborator Author

Jacobluke- commented Sep 23, 2024

Deleted mistakenly staged test file.
The latest commit also optimized the add_counts_to_ticks() function by

  1. Moved lookup_value function definition outside the loop for better readability.
  2. Simplified the lookup_value function by removing redundant exception handling and using a more concise structure.
  3. Used str.split('\n')[-1] instead of rfind for better readability and potentially slightly better performance.
  4. Removed the unnecessary ticks_loc variable and moved the set_major_locator call to the end of the function.
  5. Used plot_kwargs.get("fontsize_rawxlabel") instead of checking if it's not None, which simplifies the code.

@Jacobluke- Jacobluke- merged commit d5e9c58 into vnbdev Sep 23, 2024
4 checks passed
@Jacobluke- Jacobluke- deleted the feat-contrast-bars branch September 23, 2024 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants