Skip to content

Commit

Permalink
update plotly to 3.4.2 and remove autoport set
Browse files Browse the repository at this point in the history
update plotly to continue support title update, i.e. so that

```
fig['layout'].update(title=...)
```

works.

Remove the auto port feature because I kept accidentally looking
at the wrong port. Explicit is better than implicit.
  • Loading branch information
vitchyr committed Dec 30, 2018
1 parent 7369b48 commit b07f9b5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Flask==0.12.2
Flask==1.0.2
matplotlib==2.0.2
plotly==1.9.6
plotly==3.4.2
numpy==1.11.3
24 changes: 9 additions & 15 deletions viskit/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def make_plot(
y=y_upper + y_lower[::-1],
fill='tozerox',
fillcolor=core.hex_to_rgb(color, 0.2),
line=go.Line(color='transparent'),
line=go.scatter.Line(color=core.hex_to_rgb(color, 0)),
showlegend=False,
legendgroup=plt.legend,
hoverinfo='none'
Expand Down Expand Up @@ -808,17 +808,11 @@ def reload_data(data_filename):
args.data_paths.append(path)
print("Importing data from {path}...".format(path=args.data_paths))
reload_data(args.dname)
for i in range(10):
port = args.port + i
complete = True
try:
print("Done! View http://localhost:%d in your browser" % port)
app.run(host='0.0.0.0', port=port, debug=args.debug)
except OSError as e:
if e.strerror == 'Address already in use':
complete = False
print("Port {} is being used. Trying next port.".format(port))
if complete:
break
if i == 9:
print("All tried ports are busy. Try specifying a port with --port=6000")
port = args.port
try:
print("View http://localhost:%d in your browser" % port)
app.run(host='0.0.0.0', port=port, debug=args.debug)
except OSError as e:
if e.strerror == 'Address already in use':
print("Port {} is busy. Try specifying a different port with ("
"e.g.) --port=5001".format(port))

0 comments on commit b07f9b5

Please sign in to comment.