Remove plotly_example
This commit is contained in:
parent
fa1b7de52a
commit
220396018b
|
@ -1,25 +0,0 @@
|
|||
from sanic import Sanic
|
||||
from sanic.response import html
|
||||
import plotly
|
||||
import plotly.graph_objs as go
|
||||
|
||||
app = Sanic(__name__)
|
||||
|
||||
|
||||
@app.route('/')
|
||||
async def index(request):
|
||||
trace1 = go.Scatter(
|
||||
x=[0, 1, 2, 3, 4, 5],
|
||||
y=[1.5, 1, 1.3, 0.7, 0.8, 0.9]
|
||||
)
|
||||
trace2 = go.Bar(
|
||||
x=[0, 1, 2, 3, 4, 5],
|
||||
y=[1, 0.5, 0.7, -1.2, 0.3, 0.4]
|
||||
)
|
||||
|
||||
data = [trace1, trace2]
|
||||
return html(plotly.offline.plot(data, auto_open=False, output_type='div'))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host='0.0.0.0', port=8000, debug=True)
|
|
@ -1,2 +0,0 @@
|
|||
plotly>=2.0.7
|
||||
sanic>=0.5.0
|
Loading…
Reference in New Issue
Block a user