The Wayback Machine - https://web.archive.org/web/20240110183404/https://github.com/matplotlib/matplotlib/pull/20034
Skip to content
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

Add keyword numticks in LogLocator in _autolev in contour.py #20034

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hp77-creator
Copy link

@hp77-creator hp77-creator commented Apr 21, 2021

PR Summary

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • 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).
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

Affects #19856

Made changes in the _autolev() method to include numticks keyword argument in the LogLocator called inside the function. After the changes, following images are obtained
image

which earlier used to be like this
image

@@ -1088,7 +1088,7 @@ def _autolev(self, N):
"""
if self.locator is None:
if self.logscale:
self.locator = ticker.LogLocator()
self.locator = ticker.LogLocator(numticks=N)
Copy link
Member

Choose a reason for hiding this comment

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

Should this be N+1 like the line below?

The docstring of this function will also need to be changed (as it claims that this is not supporte).

Copy link
Author

Choose a reason for hiding this comment

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

I think, purpose of N is to set the level to N , idk if it should be N+1 I would like to ask @jklymak to weigh in! Regarding docstring, I guess it should have been doing this thing based on N but yeah I can update the docstring, if you all would suggest that!

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I don't have any particular input here about the "right" behaviour. I think you should just make it consistent with what LogLocator would do an an axes. You will either break some tests with this, or if there were no tests will need to create some tests that exercise this...

In the above the changes are quite large, so you need to argue that they are better, or more flexible somehow. Maybe the default needs to be something that is as backwards compatible as possible.

Overall, though, I think passing numticks through to the LogLocator makes sense, but you should argue it a bit more completely here to get buy-in.

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 jklymak marked this pull request as draft May 5, 2021 23:07
@jklymak jklymak added this to the v3.5.0 milestone May 5, 2021
@QuLogic QuLogic modified the milestones: v3.5.0, v3.6.0 Aug 23, 2021
@QuLogic QuLogic modified the milestones: v3.6.0, v3.7.0 Jul 5, 2022
@tacaswell
Copy link
Member

@hp77-creator Are you still interested in working on this?


I am going move this to the "future release" milestone for now.

@tacaswell tacaswell modified the milestones: v3.7.0, future releases Dec 16, 2022
Copy link

Since this Pull Request has not been updated in 60 days, it has been marked "inactive." This does not mean that it will be closed, though it may be moved to a "Draft" state. This helps maintainers prioritize their reviewing efforts. You can pick the PR back up anytime - please ping us if you need a review or guidance to move the PR forward! If you do not plan on continuing the work, please let us know so that we can either find someone to take the PR over, or close it.

@github-actions github-actions bot added the status: inactive Marked by the “Stale” Github Action label Dec 13, 2023
@hp77-creator
Copy link
Author

@tacaswell is this feature merged in any other PR?

@github-actions github-actions bot removed the status: inactive Marked by the “Stale” Github Action label Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for author
Development

Successfully merging this pull request may close these issues.

None yet

4 participants