File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -44,12 +44,15 @@ def draw_if_interactive():
4444class Show (backend_bases .ShowBase ):
4545 def mainloop (self ):
4646 WebAggApplication .initialize ()
47- if rcParams ['webagg.open_in_browser' ]:
48- import webbrowser
49- print ("Opening in webbrowser" )
50- for manager in Gcf .get_all_fig_managers ():
51- webbrowser .open ("http://127.0.0.1:{0}/{1}/" .format (
52- WebAggApplication .port , manager .num ))
47+ for manager in Gcf .get_all_fig_managers ():
48+ url = "http://127.0.0.1:{0}/{1}/" .format (
49+ WebAggApplication .port , manager .num )
50+ if rcParams ['webagg.open_in_browser' ]:
51+ import webbrowser
52+ webbrowser .open (url )
53+ else :
54+ print ("To view figure, visit {0}" .format (url ))
55+
5356 WebAggApplication .start ()
5457
5558show = Show ()
You can’t perform that action at this time.
0 commit comments