1. 程式人生 > >?python高級數據可視化視頻Dash1

?python高級數據可視化視頻Dash1

app lin AR http () tor 結果 true .com

在谷歌瀏覽器輸入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)

  

?python高級數據可視化視頻Dash1