Skip to content

Extended the convolution filter for correct dilation #19303

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
Jan 16, 2021
Merged

Extended the convolution filter for correct dilation #19303

merged 1 commit into from
Jan 16, 2021

Conversation

chbauman
Copy link
Contributor

Changed the convolution filter from [1, 1] to [1, 1, 1] such that the mask is dilated on both sides, not only at the end.

PR Summary

PR Checklist

  • [N/A] Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • [N/A] New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • [N/A] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [N/A] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

Changed the convolution filter from [1, 1] to [1, 1, 1] such that the mask is dilated on both sides, not only at the end.
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a while, please feel free to ping @matplotlib/developers or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@jklymak
Copy link
Member

jklymak commented Jan 15, 2021

Thanks for the PR. I can imagine this is correct. Do you have some examples showing the previous version did bad things and this is better?

@chbauman
Copy link
Contributor Author

chbauman commented Jan 16, 2021 via email

@jklymak
Copy link
Member

jklymak commented Jan 16, 2021

Your images didn't make it through via email.

@chbauman
Copy link
Contributor Author

1_1
1_1_1

This should work I guess.

@chbauman
Copy link
Contributor Author

The following plots show the difference, they can be regeneratue using the given example (https://matplotlib.org/gallery/event_handling/resample.html) and setting ax.set_xlim(232, 234) instead of ax.set_xlim(16, 365).
The top image shows how it was before, the one below shows how it looks with the proposed changes.

@jklymak jklymak added this to the v3.4.0 milestone Jan 16, 2021
@jklymak jklymak merged commit e341b26 into matplotlib:master Jan 16, 2021
@jklymak
Copy link
Member

jklymak commented Jan 16, 2021

Makes sense to me. Thanks a lot!

@chbauman chbauman deleted the patch-1 branch January 17, 2021 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants