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

closes #26477 ENH: Add interpolation_stage in qt figureoptions #26500

Conversation

Tsufael
Copy link
Contributor

@Tsufael Tsufael commented Aug 11, 2023

I'm not sure if demonstration in an [example] and writing tests for this PR applies.

Closes #26477

PR summary

Add getter for image interpolation_stage;
Add interpolation_stage selector for images in qt figureoptions.

The getter was added to check what option should be selected when the menu is opened.

PR checklist

@Tsufael Tsufael changed the title E/NH: Add interpolation_stage in qt figureoptions resolve resolve #26477 ENH: Add interpolation_stage in qt figureoptions Aug 11, 2023
@Tsufael Tsufael changed the title resolve resolve #26477 ENH: Add interpolation_stage in qt figureoptions resolve #26477 ENH: Add interpolation_stage in qt figureoptions Aug 11, 2023
@Tsufael Tsufael changed the title resolve #26477 ENH: Add interpolation_stage in qt figureoptions closes #26477 ENH: Add interpolation_stage in qt figureoptions Aug 11, 2023
@Tsufael Tsufael marked this pull request as draft August 11, 2023 19:47
@Tsufael Tsufael force-pushed the add-qt-interpolation_stage-selector-for-images branch from d8d880c to 4f3b7ac Compare August 11, 2023 22:22
@melissawm
Copy link
Contributor

Hello @Tsufael - just noting that if you want this to be reviewed, make sure you mark it as "Ready for review". Thanks!

@Tsufael Tsufael marked this pull request as ready for review August 23, 2023 15:46
@oscargus
Copy link
Contributor

I do not think that the figure options dialog is currently tested.

You will need to add something like

def get_interpolation_stage(self) -> Literal["data", "rgba"]: ...

to image.pyi (ideally above set_interpolation_stage) to get rid of the mypy error (not clear to me what the role of 'none' is here though).

For the PR it looks OK, but will have to try it out manually before I can fully tell/approve.

@QuLogic
Copy link
Member

QuLogic commented Mar 14, 2024

This appears to work as far as I can tell. I rebased and added the type hint as this seems almost complete.

@QuLogic QuLogic force-pushed the add-qt-interpolation_stage-selector-for-images branch from c54675d to 518d70f Compare March 15, 2024 09:09
@QuLogic
Copy link
Member

QuLogic commented Mar 15, 2024

One more rebase to fix linting and docs.

Copy link
Member

@dstansby dstansby left a comment

Choose a reason for hiding this comment

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

Checked the figure options locally, and it works. Anyone can merge if/when CI passes.

Thanks for your first PR to Matplotlib!

@timhoffm timhoffm merged commit 98381ab into matplotlib:main Mar 15, 2024
41 of 43 checks passed
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.

[ENH]: Add interpolation_stage selector for images in qt figureoptions
6 participants