Here is a simple working example, adapted from
import dash
import dash_core_components as dcc
import dash_html_components as html
external_stylesheets = ['
https://codepen.io/chriddyp/pen/bWLwgP.css']
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
app.layout = html.Div(children=[
html.H1(children='Hello Dash'),
html.Div(children='''
Dash: A web application framework for Python.
'''),
dcc.Graph(
id='example-graph',
figure={
'data': [
{'x': [1, 2, 3], 'y': [4, 1, 2], 'type': 'bar', 'name': 'SF'},
{'x': [1, 2, 3], 'y': [2, 4, 5], 'type': 'bar', 'name': u'Montréal'},
{'x': [1, 2, 3], 'y': [5, 2, 6], 'type': 'bar', 'name': 'SF', 'xaxis': 'x2',},
{'x': [1, 2, 3], 'y': [4, 1, 2], 'type': 'bar', 'name': u'Montréal', 'yaxis': 'y2',},
],
'layout': {
'title': 'Dash Data Visualization',
'xaxis': {'domain':[0, 0.5]},
'xaxis2': {'domain':[0.6, 1]},
'yaxis2': {'anchor': 'x2'}
}
}
)
])
if __name__ == '__main__':
app.run_server(debug=True)
It should output something like,