Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Milestone
Description
Bug report
Bug summary
Hardcoded URL in webagg backend is misleading and sometimes wrong
Code for reproduction
importmatplotlibasmplmpl.use('WebAgg')importmatplotlib.pyplotaspltimportnumpyasnpmpl.rcParams['webagg.open_in_browser']=Falsefig,plot=plt.subplots(nrows=1)plot.imshow(np.random.rand(224,224,3))plt.show()
Actual outcome
To view figure, visit http://127.0.0.1:8988Press Ctrl+C to stop WebAgg server
Expected outcome
Hopefully something like
To view figure, visit http://[insert my server IP here]:8988Press Ctrl+C to stop WebAgg server
Matplotlib version
- Operating system: Ubuntu 16.04
- Matplotlib version: 2.0.2
- Matplotlib backend (
print(matplotlib.get_backend())
): WebAgg - Python version: 3.6.1
- Jupyter version (if applicable):
- Other libraries:
Basically, it'd be nice to have control over what IP gets printed there, instead of hard coding localhost --https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/backends/backend_webagg.py#L324 -- maybe add another key to rcParams? (and leave localhost as the default?)