Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 754a1be

Browse filesBrowse files
committed
return a (local file) url, just like py.plot
1 parent 6e9bdb3 commit 754a1be
Copy full SHA for 754a1be

File tree

1 file changed

+4
-1
lines changed
Filter options

1 file changed

+4
-1
lines changed

‎plotly/offline/offline.py

Copy file name to clipboardExpand all lines: plotly/offline/offline.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,11 @@ def plot(figure_or_data,
279279
'</body>',
280280
'</html>']))
281281

282+
url = 'file://' + os.path.abspath(filename)
282283
if auto_open:
283-
webbrowser.open('file://' + os.path.abspath(filename))
284+
webbrowser.open(url)
285+
286+
return url
284287

285288
elif output_type == 'div':
286289
if include_plotlyjs:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.