Skip to content

Factor out layer selecton and MPL figure creation #125

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
May 19, 2023

Conversation

dstansby
Copy link
Member

I started writing docs for #24, and in the process realised that third-party users might want to just have a plain napari-styled Matplotlib figure, without any of the napari layer callbacks setup.

This PR extracts the functionality for setting up the Matplotlib figure into BaseNapariMPLWidget, which is then inherited by NapariMPLWidget to add the layer selection event updating bits. This doesn't change the API, but does provide a nicer separation of responsibilities between the new classes, and the new base class that could be used by third party users.

@dstansby dstansby marked this pull request as ready for review May 18, 2023 15:40
Copy link
Collaborator

@ruaridhg ruaridhg left a comment

Choose a reason for hiding this comment

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

LGTM

@ruaridhg ruaridhg added this pull request to the merge queue May 19, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks May 19, 2023
@ruaridhg ruaridhg added this pull request to the merge queue May 19, 2023
@dstansby dstansby removed this pull request from the merge queue due to the queue being cleared May 19, 2023
@dstansby dstansby merged commit 20bc846 into matplotlib:main May 19, 2023
@dstansby dstansby deleted the refactor branch May 19, 2023 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants