Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Simplify logic for adding a single axes#88

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
samcunliffe merged 1 commit intomatplotlib:mainfromdstansby:adding-axes
May 5, 2023

Conversation

dstansby
Copy link
Member

  • Add afigure() property toNapariMPLWidget, to replace the documented.figure attribute that actually never existed.
  • Add aadd_single_axes() helper method toNapariMPLWidget, that automatically adds a single axes and styles it.
  • Clarify thatNapariMPLWidget is not responsible for adding Axes to the figure.

@dstansbydstansby marked this pull request as ready for reviewMay 5, 2023 11:36
Copy link
Collaborator

@samcunliffesamcunliffe left a comment

Choose a reason for hiding this comment

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

Yep cool. It's now explicit that we're delegating responsibility for the axis to each widget (which wasn't super clear tome on first pass).

From a styling PoV, are you thinking we'll tweakapply_napari_colorscheme to be overrideable (like from a user-supplied stylesheet)?

# changing color of axes background to transparent
self.canvas.figure.patch.set_facecolor("none")
Copy link
Collaborator

Choose a reason for hiding this comment

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

The figure's facecolor doesn't need to be set?

No, it doesn't but I don't get why.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

It's already set inNapariMPLWidget.__init__()

Copy link
Collaborator

Choose a reason for hiding this comment

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

🤦 yep. Ty.

@samcunliffesamcunliffe added this pull request to the merge queueMay 5, 2023
Merged via the queue intomatplotlib:main with commit2f5fde3May 5, 2023
@dstansbydstansby deleted the adding-axes branchMay 5, 2023 13:04
@dstansby
Copy link
MemberAuthor

From a styling PoV, are you thinking we'll tweak apply_napari_colorscheme to be overrideable (like from a user-supplied stylesheet)?

I'm expecting it will eventually become mostly redundant and replaced by a style sheet.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@samcunliffesamcunliffesamcunliffe approved these changes

@ruaridhgruaridhgAwaiting requested review from ruaridhg

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@dstansby@samcunliffe

[8]ページ先頭

©2009-2025 Movatter.jp