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

Appearance settings

Commit fdadd63

Browse filesBrowse files
committed
FIX: make sure nbagg figure are shown when created
Removing the `draw_if_interactive` from `pyplot.figure` in b2fbae7 causes the figures to no longer be shown on creation in nbagg, this special-cases the manager creating in nbagg to ensure that the figure is indeed shown. The root cause of this is that unlike every other backend which call `show` in either the Manager `__init__` or one of the `new_figure_manager` functions, nbagg did not
1 parent b0b49cb commit fdadd63
Copy full SHA for fdadd63

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed

‎lib/matplotlib/backends/backend_nbagg.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_nbagg.py
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ def new_figure_manager_given_figure(num, figure):
224224
if rcParams['nbagg.transparent']:
225225
figure.patch.set_alpha(0)
226226
manager = FigureManagerNbAgg(canvas, num)
227+
if is_interactive():
228+
manager.show()
229+
figure.canvas.draw_idle()
227230
return manager
228231

229232

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.