Skip to content

Simplify and generalize BezierSegment. #13355

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

Merged
merged 1 commit into from
Oct 1, 2019

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Feb 3, 2019

As it turns out, it is simpler to write the d-dimensional version than
the 2-dimensional special case.

I initially tried to rebase the original PR (#9686, from @ijackson) but the codebase has diverged to much for it to make sense.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@@ -25,7 +25,7 @@ def __init__(self, canvas, cankill):
# for simplicity I'm going to reuse a bitmap from wx, you'll
# probably want to add your own.
tool = self.AddTool(wx.ID_ANY, 'Click me', _load_bitmap('back.png'),
'Activate custom contol')
'Activate custom control')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

noticed because the docstring of BezierSegment had the same typo :)

@anntzer
Copy link
Contributor Author

anntzer commented May 31, 2019

edit: let's also support arbitrary N, while we're at it...

Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

I think this looks reasonable. However, it appears that we have no tests for bezier curves; and I'm not convinced enough that I dare to approve. 😞

@anntzer
Copy link
Contributor Author

anntzer commented Jun 2, 2019

But the patch is indirectly tested by other tests (as shown by coverage).

As it turns out, it is simpler to write the d-dimensional version than
the 2-dimensional special case.
@jklymak jklymak merged commit fb86190 into matplotlib:master Oct 1, 2019
@anntzer anntzer deleted the beziersegment branch October 1, 2019 17:00
@QuLogic QuLogic added this to the v3.3.0 milestone Oct 3, 2019
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.

5 participants