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

Sign up
Appearance settings
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Commit 40785f0

Browse files
Use cell ID in plot name
1 parent 14df226 commit 40785f0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎lib/matplotlib/_plotly_helpers.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import plotly
1+
import builtins
22

33
from datetime import datetime
44
from plotly import tools
@@ -10,8 +10,9 @@ def save(cls, fig):
1010
try:
1111
plot = tools.mpl_to_plotly(fig)
1212
json = plot.to_json()
13+
cell_id = builtins.__cell_id__
1314
timestamp = datetime.utcnow().timestamp()
14-
file = open("plots/{}.json".format(timestamp), "w")
15+
file = open("plots/{}-{}.json".format(cell_id, timestamp), "w")
1516
file.write(json)
1617
file.close()
1718
except:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /