在谷歌浏览器输入http://127.0.0.1:8050/后,回车,看到下图可视化结果
# -*- coding: utf-8 -*- """ Created on Sun Mar 11 10:16:43 2018 @author: Administrator """ import dash import dash_core_components as dcc import dash_html_components as html app = dash.Dash() app.layout = html.Div(children=[ html.H1(children=‘Dash Tutorials‘), dcc.Graph( id=‘example‘, figure={ ‘data‘: [ {‘x‘: [1, 2, 3, 4, 5], ‘y‘: [9, 6, 2, 1, 5], ‘type‘: ‘line‘, ‘name‘: ‘Boats‘}, {‘x‘: [1, 2, 3, 4, 5], ‘y‘: [8, 7, 2, 7, 3], ‘type‘: ‘bar‘, ‘name‘: ‘Cars‘}, ], ‘layout‘: { ‘title‘: ‘Basic Dash Example‘ } }) ]) if __name__ == ‘__main__‘: app.run_server(debug=True)