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

Commit23604bf

Browse files
committed
Resolves#35.
1 parented39bc0 commit23604bf

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

‎src/napari_matplotlib/base.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# Icons modified from
1616
# https://github.com/matplotlib/matplotlib/tree/main/lib/matplotlib/mpl-data/images
1717
ICON_ROOT=Path(__file__).parent/"icons"
18-
NAPARI_WINDOW_COLOR="#262930"
1918
__all__= ["NapariMPLWidget"]
2019

2120

@@ -49,7 +48,7 @@ def __init__(self, napari_viewer: napari.viewer.Viewer):
4948
self.viewer=napari_viewer
5049
self.canvas=FigureCanvas()
5150

52-
self.canvas.figure.patch.set_facecolor(NAPARI_WINDOW_COLOR)
51+
self.canvas.figure.patch.set_facecolor("none")
5352
self.canvas.figure.set_layout_engine("constrained")
5453
self.toolbar=NapariNavigationToolbar(self.canvas,self)
5554
self._replace_toolbar_icons()
@@ -126,16 +125,12 @@ def draw(self) -> None:
126125
"""
127126

128127
defapply_napari_colorscheme(self):
129-
"""
130-
Apply napari-compatible colorscheme to the axes object.
131-
"""
128+
"""Apply napari-compatible colorscheme to the axes object."""
132129
ifself.axesisNone:
133130
return
134-
# changing color of axes background to napari main window color
135-
self.canvas.figure.patch.set_facecolor(NAPARI_WINDOW_COLOR)
136-
137-
# changing color of plot background to napari main window color
138-
self.axes.set_facecolor(NAPARI_WINDOW_COLOR)
131+
# changing color of axes background to transparent
132+
self.canvas.figure.patch.set_facecolor("none")
133+
self.axes.set_facecolor("none")
139134

140135
# changing colors of all axes
141136
[

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp