forked from Pierian-Data/Plotly-Dashboards-with-Dash
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1 parent
ff4f966
commit d0e5710
Showing
3 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import dash | ||
import dash_core_components as dcc | ||
import dash_html_components as html | ||
import plotly.graph_objs as go | ||
import numpy as np | ||
|
||
app = dash.Dash() | ||
|
||
# Creating DATA | ||
np.random.seed(42) | ||
random_x = np.random.randint(1,101,100) | ||
random_y = np.random.randint(1,101,100) | ||
|
||
app.layout = html.Div([dcc.Graph(id='scatterplot', | ||
figure = {'data':[ | ||
go.Scatter( | ||
x=random_x, | ||
y=random_y, | ||
mode='markers', | ||
marker = { | ||
'size':12, | ||
'color': 'rgb(51,204,153)', | ||
'symbol':'pentagon', | ||
'line':{'width':2} | ||
} | ||
)], | ||
'layout':go.Layout(title='My Scatterplot', | ||
xaxis = {'title':'Some X title'})} | ||
), | ||
dcc.Graph(id='scatterplot2', | ||
figure = {'data':[ | ||
go.Scatter( | ||
x=random_x, | ||
y=random_y, | ||
mode='markers', | ||
marker = { | ||
'size':12, | ||
'color': 'rgb(200,204,53)', | ||
'symbol':'pentagon', | ||
'line':{'width':2} | ||
} | ||
)], | ||
'layout':go.Layout(title='Second Plot', | ||
xaxis = {'title':'Some X title'})} | ||
)]) | ||
|
||
if __name__ == '__main__': | ||
app.run_server() |