Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions graphistry/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,14 @@ def plot(self, graph=None, nodes=None, name=None, render=None, skip_upload=False
info = PyGraphistry._etl2(dataset)

viz_url = PyGraphistry._viz_url(info, self._url_params)
full_url = '%s:%s' % (PyGraphistry._config['protocol'], viz_url)
cfg_client_protocol_hostname = PyGraphistry._config['client_protocol_hostname']
full_url = ('%s:%s' % (PyGraphistry._config['protocol'], viz_url)) if cfg_client_protocol_hostname is None else viz_url

if render == False or (render == None and not self._render):
return full_url
elif util.in_ipython():
from IPython.core.display import HTML
return HTML(util.make_iframe(viz_url, self._height, PyGraphistry._config['protocol']))
return HTML(util.make_iframe(full_url, self._height))
else:
import webbrowser
webbrowser.open(full_url)
Expand Down
6 changes: 3 additions & 3 deletions graphistry/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from distutils.version import LooseVersion, StrictVersion


def make_iframe(raw_url, height, protocol):
def make_iframe(url, height):
id = uuid.uuid4()

scrollbug_workaround='''
Expand All @@ -29,7 +29,7 @@ def make_iframe(raw_url, height, protocol):
oallowfullscreen="true" msallowfullscreen="true"
style="width:100%%; height:%dpx; border: 1px solid #DDD">
</iframe>
''' % (id, protocol + ':' + raw_url, height)
''' % (id, url, height)

return iframe + scrollbug_workaround

Expand Down Expand Up @@ -85,4 +85,4 @@ def error(msg):
def merge_two_dicts(a, b):
c = a.copy()
c.update(b)
return c
return c