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

[ENH]: Add interpolation_stage selector for images in qt figureoptions #26477

Closed
anntzer opened this issue Aug 9, 2023 · 5 comments · Fixed by #26500
Closed

[ENH]: Add interpolation_stage selector for images in qt figureoptions #26477

anntzer opened this issue Aug 9, 2023 · 5 comments · Fixed by #26500
Labels
Good first issue Open a pull request against these issues if there are no active ones! GUI: Qt New feature topic: images
Milestone

Comments

@anntzer
Copy link
Contributor

anntzer commented Aug 9, 2023

Problem

There's already an interactive qt selector for the interpolation method, but not yet for the interpolation_stage, which is just as (if not more) important.

Proposed solution

Add it.

@anntzer anntzer added New feature GUI: Qt Good first issue Open a pull request against these issues if there are no active ones! topic: images labels Aug 9, 2023
@github-actions
Copy link

github-actions bot commented Aug 9, 2023

Good first issue - notes for new contributors

This issue is suited to new contributors because it does not require understanding of the Matplotlib internals. To get started, please see our contributing guide.

We do not assign issues. Check the Development section in the sidebar for linked pull requests (PRs). If there are none, feel free to start working on it. If there is an open PR, please collaborate on the work by reviewing it rather than duplicating it in a competing PR.

If something is unclear, please reach out on any of our communication channels.

@Tsufael
Copy link
Contributor

Tsufael commented Aug 11, 2023

Hi,

I'm working on this issue as my first contribution to matplotlib.

I added the qt selector for interpolation_stage and it appears to be working. However, I currently hardcoded 'data' and 'rgba' as the possible options for the selector and I was wondering what would be the best way to get the option names.

The qt_selector for interpolations gets the valid options from matplotlib.image.interpolations_names, but there's no matplotlib.image.interpolation_stages_names. Should it be added?

I also saw there's a line in lib/matplotlib/image.pyi:76 stating the possible values for interpolation_stage are 'data', 'rgba' and None, but I'm not sure about how to use it to get those values or if it would be appropriate.

Maybe I'm overthinking it and hordcoding is fine as there are only two possible options, I just wanted to make sure it doesn't break if the names changed or more options were to be added in the future.

@jklymak
Copy link
Member

jklymak commented Aug 11, 2023

Hardcoding should be fine. There are really only two possibilities.

@AnnaMastori
Copy link
Contributor

Hi,
@Tsufael are you still working on the pull request ? If not, I would like to give it a try.

@Tsufael
Copy link
Contributor

Tsufael commented Aug 31, 2023

Hi @AnnaMastori,
I have opened this PR on this issue.
I'll try to fix the mypy error this week following what oscargus said.

timhoffm added a commit that referenced this issue Mar 15, 2024
…ector-for-images

closes #26477 ENH: Add interpolation_stage in qt figureoptions
@QuLogic QuLogic added this to the v3.9.0 milestone Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Open a pull request against these issues if there are no active ones! GUI: Qt New feature topic: images
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants