diff --git a/graphistry/plotter.py b/graphistry/plotter.py index 8b6632aa5f..dd11a95b3e 100644 --- a/graphistry/plotter.py +++ b/graphistry/plotter.py @@ -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) diff --git a/graphistry/util.py b/graphistry/util.py index ec5f927f09..533711a142 100644 --- a/graphistry/util.py +++ b/graphistry/util.py @@ -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=''' @@ -29,7 +29,7 @@ def make_iframe(raw_url, height, protocol): oallowfullscreen="true" msallowfullscreen="true" style="width:100%%; height:%dpx; border: 1px solid #DDD"> - ''' % (id, protocol + ':' + raw_url, height) + ''' % (id, url, height) return iframe + scrollbug_workaround @@ -85,4 +85,4 @@ def error(msg): def merge_two_dicts(a, b): c = a.copy() c.update(b) - return c \ No newline at end of file + return c