Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plot improvements #24

Merged
merged 10 commits into from Feb 24, 2024
Merged

Plot improvements #24

merged 10 commits into from Feb 24, 2024

Conversation

maximz
Copy link
Owner

@maximz maximz commented Jan 31, 2022

PR summary courtesy of GPT-4:

  • Enhancements and New Features in scatterplot:

    • Enabled functionality for scatter plots without a specified hue by allowing hue_key to be None.
    • Introduced additional customization options for markers, including marker_zorder, marker_size_scale_factor, legend_size_scale_factor, marker_face_color, and marker_linewidths.
    • Implemented changes to disable the legend automatically when hue_key is None.
  • New Utility Functions:

    • Added superimpose_group_labels function to overlay group labels on a plot, moving away from directly including this within the scatterplot function.
    • Created add_sample_size_to_legend to append sample sizes to legend labels in scatter plots.
  • Improvements in Plot Customization and Utility:

    • Enhanced wrap_tick_labels with options for better text wrapping, including specifying characters that encourage line breaks.
    • Clarified behavior in normalize_rows and normalize_columns regarding handling rows or columns with all zeroes, indicating that such cases will result in NaNs.

@codecov
Copy link

codecov bot commented Jan 31, 2022

Codecov Report

Attention: Patch coverage is 96.77419% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 96.42%. Comparing base (7bc2e1a) to head (d301804).

Files Patch % Lines
genetools/plots.py 96.77% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #24      +/-   ##
===========================================
+ Coverage    96.25%   96.42%   +0.17%     
===========================================
  Files            6        6              
  Lines          347      364      +17     
  Branches        60       64       +4     
===========================================
+ Hits           334      351      +17     
  Misses           1        1              
  Partials        12       12              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…t(). Rationale: we may want to run scatterplot() twice against the same ax, with different z-orders (or other HVS params) for the two collections of data. Simply passing a zorder kwarg doesn't work because HVS supplies a default style zorder kwarg too, i.e. we'd be calling ax.scatter with two conflicting zorder kwargs.
…ing compared against. For example, a numerical category #8 will be converted to a string label '8'. To get sample size of that numerical category, we need to cast back to int first.
@maximz maximz marked this pull request as ready for review February 24, 2024 21:00
@maximz maximz merged commit 2e2bcc1 into develop Feb 24, 2024
14 checks passed
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.

None yet

1 participant