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

Add size parameter to scatter artist #29

Merged
merged 14 commits into from
Jul 25, 2024
Merged

Add size parameter to scatter artist #29

merged 14 commits into from
Jul 25, 2024

Conversation

jo-mueller
Copy link
Contributor

@jo-mueller jo-mueller commented Jul 23, 2024

Fixes #28

Add a size property to the Scatter class to control the size of each point in the scatter plot.

  • Scatter Class:

    • Add a size property that accepts a float or an array of floats.
    • Default the size property to 1.
    • Reset the size property to 1 when new data is set.
    • Update the draw method to use the size property.
  • Tests:

    • Add tests for the size property in the test_scatter function.
    • Test that the size property accepts a float and an array of floats.
    • Test that the size property resets to a default value when new data is set.
  • Documentation:

    • Add documentation for the size property in the Scatter class.

For more details, open the Copilot Workspace session.

Related to #26

Add `alpha` property to control alpha-value of scatter points

* Add `alpha` property to `Scatter` class in `src/biaplotter/artists.py`
  - Initialize `alpha` property in `__init__` method
  - Update `draw` method to use `alpha` property
  - Add getter and setter for `alpha` property
* Add functionality to set and get `alpha` property for scatter artist in `CanvasWidget` class in `src/biaplotter/plotter.py`
  - Add `alpha` property to `CanvasWidget` class
  - Update `active_artist` setter to handle `alpha` property
* Add unit tests for `alpha` property in `Scatter` class in `src/biaplotter/_tests/test_artists.py`
  - Test initialization, setting, and usage of `alpha` property

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/BiAPoL/biaplotter/issues/26?shareId=df67f154-a9ed-4910-a0bd-40b60e78eacc).
Copy link

codecov bot commented Jul 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.66%. Comparing base (65e2e9b) to head (063d47d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #29      +/-   ##
==========================================
+ Coverage   90.11%   90.66%   +0.54%     
==========================================
  Files           7        7              
  Lines         597      621      +24     
==========================================
+ Hits          538      563      +25     
+ Misses         59       58       -1     

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

@zoccoler
Copy link
Contributor

This looks great, thanks @jo-mueller !

@zoccoler zoccoler merged commit d1ebeb4 into main Jul 25, 2024
11 checks passed
@jo-mueller jo-mueller deleted the jo-mueller/add-size branch July 25, 2024 11:11
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.

Add size
2 participants