Skip to content

Conversation

dihm
Copy link
Contributor

@dihm dihm commented Jan 6, 2021

PR Summary

This clarifies that the mapping functions for secondary_axis need to be defined beyond the nominal plot range, which requires special care when doing ad-hoc mappings using interpolation functions.

I've also added a very brief note that at least hints at how to use ad-hoc mapping when defining the interpolation beyond the data range is impractical. I'll be the first to admit it is probably a bit too cryptic as written, but I also didn't want to add a novel.

Addresses #19205

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).
  • [N/A ] 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).

This clarifies that the mapping functions for secondary_axis need to be defined beyond the nominal plot range, which requires special care when doing ad-hoc mappings using interpolation functions.

Addresses matplotlib#19205
Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

This reads well to me. Thanks! OTOH we have somewhat strict formatting requirements - can you remove the trailing whitespaces so the flake8 test passes. (I know, its a pain - my editor adds trailing whitespace by default as well).

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.

@dihm
Copy link
Contributor Author

dihm commented Jan 6, 2021

No worries. That should square it away.

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.

Thanks for the PR. The proposed changes should make the doc build pass.

dihm and others added 2 commits January 7, 2021 09:45
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
@timhoffm timhoffm added this to the v3.4.0 milestone Jan 8, 2021
@timhoffm timhoffm merged commit 5417682 into matplotlib:master Jan 8, 2021
@timhoffm
Copy link
Member

timhoffm commented Jan 8, 2021

Congratulations on your first contribution to Matplotlib! We hope to see you back.

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.

3 participants