Closed
Description
Thanks for developping!
Currently, the URL is shown only when rcParams['webagg.open_in_browser']
is False.
# from matplotlib/lib/matplotlib/backends/backend_webagg.py
@staticmethod
def show():
WebAggApplication.initialize()
url = "http://{address}:{port}{prefix}".format(
address=WebAggApplication.address,
port=WebAggApplication.port,
prefix=WebAggApplication.url_prefix)
if rcParams['webagg.open_in_browser']:
import webbrowser
webbrowser.open(url)
else:
print("To view figure, visit {0}".format(url))
WebAggApplication.start()
- Is it possible to print the URL when
webbrowser.open
failed? - Or, simply set
webagg.open_in_browser
to False when$DISPLAY
is empty on Linux?
Matplotlib version
- Operating system: Debian 10
- Matplotlib version: 3.1.1
- Matplotlib backend (
print(matplotlib.get_backend())
): webagg - Python version: 3.7.4