Skip to content

Conversation

@nawendt
Copy link
Contributor

@nawendt nawendt commented Apr 5, 2023

This is a continuation of #1609 due to some git/github oddities.

This commit adds a path effect to make lines drawn appear to be
scalloped. This was based off of modifying the matplotlib
TickedStroke path effect. This style of line is often used for
highlighting areas in SPC MCD products.

  • Tests added
  • Fully documented

@nawendt nawendt requested a review from a team as a code owner April 5, 2023 23:13
@nawendt nawendt requested review from dopplershift and removed request for a team April 5, 2023 23:13
@nawendt nawendt mentioned this pull request Apr 5, 2023
2 tasks
@dcamron
Copy link
Member

dcamron commented Apr 11, 2023

@nawendt I took a bit this afternoon to reconcile your changes with the final product in #2420 and rebase on main in d209f35. I'll be glad to push that up here, but please take a look first and make sure the changes are in line with your view of your contribution. Note I haven't done any other review of functionality yet. Thanks again for this hard work!

@nawendt
Copy link
Contributor Author

nawendt commented Apr 12, 2023

I do not see any issues.

@dcamron dcamron force-pushed the feature-scallop branch 2 times, most recently from d209f35 to 39b9323 Compare April 13, 2023 16:55
@dcamron
Copy link
Member

dcamron commented Apr 13, 2023

Alright, rebased and cleaned up. @nawendt be sure to stash any local changes and pull this branch first before responding to reviews or any other changes. Thanks again!

@dcamron dcamron force-pushed the feature-scallop branch 2 times, most recently from ab5c82f to 5dc9d57 Compare April 13, 2023 17:05
nawendt and others added 4 commits April 13, 2023 12:49
This commit adds a path effect to make lines drawn appear to be
scalloped. This was based off of modifying the matplotlib
TickedStroke path effect. This style of line is often used for
highlighting areas in SPC MCD products.

Places it in metpy.plots.patheffects module with patches for
versions of matplotlib < 3.2 in the metpy.plots._mpl module.

wrong test return
Removed `withScallopedStroke` as this only added the original path to
the plot. It is unlikely users will want this for this style of line.
This also negates the need for the `_mpl._subclass_with_normal`
monkey patch.

Improved handling of control points at the end point of the path. The
unit tangent vector is calculated based on if the path is a closed
polygon or not. Tests were updated/added for these scenarios.
Reconcile changes in patheffects.py and test_patheffects.py after Unidata#2420.
Also remove Matplotlib<3.3.0 considerations and satisfy the lint robots.
Copy link
Member

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

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

This looks good, pending CI being happy. Thanks @nawendt !

@dopplershift dopplershift added this to the April 2023 milestone Apr 28, 2023
@dopplershift dopplershift added Type: Feature New functionality Area: Plots Pertains to producing plots labels Apr 28, 2023
@dopplershift dopplershift requested a review from dcamron April 28, 2023 19:21
@dcamron dcamron merged commit 8f2a753 into Unidata:main May 2, 2023
@nawendt nawendt deleted the feature-scallop branch April 25, 2024 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Plots Pertains to producing plots Type: Feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants