10000 127.0.0.1 hardcoded in webagg backend server · Issue #13055 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
127.0.0.1 hardcoded in webagg backend server #13055
Closed
@thedch

Description

@thedch

Bug report

Bug summary

Hardcoded URL in webagg backend is misleading and sometimes wrong

Code for reproduction

import matplotlib as mpl
mpl.use('WebAgg')
import matplotlib.pyplot as plt
import numpy as np

mpl.rcParams['webagg.open_in_browser'] = False
fig, 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:8988
Press Ctrl+C to stop WebAgg server

Expected outcome

Hopefully something like

To view figure, visit http://[insert my server IP here]:8988
Press 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?)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0