Skip to content

Commit

Permalink
Merge pull request #266 from jkittner/curved-box
Browse files Browse the repository at this point in the history
Fix issue where sectors showed a straight line instead of a curved
  • Loading branch information
ocefpaf committed Apr 22, 2024
2 parents ad285d0 + 5102055 commit e5b2330
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/tests.yml
Expand Up @@ -38,3 +38,10 @@ jobs:
run: |
pytest -s -rxs -vv -Werror tests/ --mpl --mpl-generate-summary=html \
--mpl-results-path="windrose_test_output-${{ matrix.os }}-${{ matrix.python-version }}"
- name: Store mpl-results
uses: actions/upload-artifact@v4
if: failure()
with:
name: "windrose_test_output-${{ matrix.os }}-${{ matrix.python-version }}"
path: "windrose_test_output-${{ matrix.os }}-${{ matrix.python-version }}"
retention-days: 1
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -5,6 +5,11 @@
All notable changes to this code base will be documented in this file,
in every released version.

### Version 1.x.x (unreleased)

## What's Changed
* Fix issue where sometimes the plot sectors showed a straight line instead of a curved one (#137)

### Version 1.7.0

## What's Changed
Expand Down
Binary file modified tests/output/df/test_bar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/output/df/test_box.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/output/func/test_wrbox.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/output/oo/test_windrose_stacked_histogram_normed.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/output/test_bar_from_factory.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions windrose/windrose.py
Expand Up @@ -642,6 +642,8 @@ def bar(self, direction, var, **kwargs):
zorder=zorder,
**kwargs,
)
# needed so the the line of the rectangle becomes curved
patch.get_path()._interpolation_steps = 100
self.add_patch(patch)
if j == 0:
self.patches_list.append(patch)
Expand Down Expand Up @@ -718,6 +720,8 @@ def box(self, direction, var, **kwargs):
zorder=zorder,
**kwargs,
)
# needed so the the line of the rectangle becomes curved
patch.get_path()._interpolation_steps = 100
self.add_patch(patch)
if j == 0:
self.patches_list.append(patch)
Expand Down

0 comments on commit e5b2330

Please sign in to comment.