Eda-toolkit

Latest version: v0.0.15

Safety actively analyzes 715032 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 5

0.0.5

Ensure Consistent Font Size and Text Wrapping Across Plot Elements

Description

This PR addresses inconsistencies in font sizes and text wrapping across various plot elements in the `stacked_crosstab_plot` function. The following updates have been implemented to ensure uniformity and improve the readability of plots:

1. **Title Font Size and Text Wrapping:**
- Added a `text_wrap` parameter to control the wrapping of plot titles.
- Ensured that title font sizes are consistent with axis label font sizes by explicitly setting the font size using `ax.set_title()` after plot generation.

2. **Legend Font Size Consistency:**
- Incorporated `label_fontsize` into the legend font size by directly setting the font size of the legend text using `plt.setp(legend.get_texts(), fontsize=label_fontsize)`.
- This ensures that the legend labels are consistent with the title and axis labels.

Testing

- Verified that titles now wrap correctly and match the specified `label_fontsize`.
- Confirmed that legend text scales according to `label_fontsize`, ensuring consistent font sizes across all plot elements.

Outcome

These changes improve the visual consistency of plots generated by the `stacked_crosstab_plot` function, making the plots more professional and easier to read. This PR should be reviewed and merged to standardize font sizing and text presentation across the codebase.

0.0.4

- Stable release:
- No new updates to codebase
- Updated project `description` variable in `setup.py` to re-emphasize key elements of library
- minor readme cleanup:
- added icons for sections that did not have them

0.0.3

- Stable release:
- Updated logo size, fixed citation title, and some minor readme cleanup:
- added additional section for documentation, cleaned up verbiage, moved acknowledgements section before licensing and support

0.0.2

- added zenodo citation to `PyPI`
- added logo to `PyPI`
- added acknowledgements and references to `PyPI`

0.0.1c

Release Notes

Changes from `main_old.py` to `main.py`

1. **Imports and Dependencies:**
- **Removed:**
- `import datetime`.
- **Added:**
- `import matplotlib.ticker as mticker` for formatting.
- `import sys` for conditional imports.
- Conditional import of `datetime` depending on Python version (`sys.version_info`).

2. **Function Changes:**

- **Function `add_ids`:**
- **Parameter Modifications:**
- `column_name` renamed to `id_colname`.
- New parameters `num_digits` to specify ID digit length, and `set_as_index` to optionally set the new ID column as the index.
- **Functionality Update:**
- Allows setting the new ID column as an index and customizes the number of digits in generated IDs.
- **Documentation Update:** Expanded to describe new parameters and functionality.

- **Function `scatter_plots_grid`:**
- **New Functionality:**
- Added options for customizing axis limits (`xlim`, `ylim`).
- Enhanced options for saving plots as PNG or SVG.
- Added support for showing or hiding plots based on user preference (`show_plot` parameter).
- Improved legend management with the option to show or remove the legend.
- Introduced parameters to control tick labels and axis label font sizes.

- **Plot Saving and Displaying Enhancements:**
- The code for saving and displaying plots has been refactored:
- **Saving individual plots:** Can now be conditionally saved based on user input (`save_individual`).
- **Saving and displaying grids:** Improved support for saving grids of plots as a single image and displaying them conditionally.

- **Additional Enhancements:**
- Introduced new function for fitting and plotting best-fit lines in scatter plots.

3. **New Functions:**

- **`add_best_fit`:**
- **Description:** Adds a best-fit line to a scatter plot with customizable line style and color.
- **Parameters:** `ax`, `x_data`, `y_data`, `line_style`, `line_color`.

4. **Code Structural Changes:**

- **Comment and Documentation Updates:**
- Improved and expanded docstrings and inline comments.
- Added detailed explanations for new parameters and functionalities.

- **Refactoring:**
- Plotting-related code was reorganized for better readability and maintainability.

5. **Bug Fixes and Enhancements:**

- **Plotting Enhancements:**
- Improved handling of axis visibility and edge cases.
- Enhanced plot saving mechanisms to ensure correct file naming and prevent overwriting.

- **Error Handling:**
- Improved error handling and warnings related to file saving and plotting.

0.0.1rc0

- No new updates to codebase; just minimal documentation updates to readme and `setup.py` files

Page 4 of 5

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.